Add Models to Sample Projects
Updated: 10/06/2022
This page describes the steps to add a Live2D Cubism model to the Live2D Cubism SDK for Java sample.
The sample should be built in advance by referring to “Android Sample Running Instructions.”
In this tutorial, add the sample model “Miara” to the sample project.
See the “Adding Models to Sample Projects” page of SDK for Native for the flow from downloading and processing a model to incorporating it into a program.
Program-side Changes
Add the folder for the model that has been configured to the resources folder.
Add to [root]/Sample/src/main/assets folder.
Add MIARA to the ModelDir enumeration in LAppDefine.java. If the index of the first argument is not correctly sequentially numbered, it will not work properly.
Also, enter the folder name of the model in the second argument.
public enum ModelDir { HARU(0, "Haru"), HIYORI(1, "Hiyori"), MARK(2, "Mark"), NATORI(3, "Natori"), RICE(4, "Rice"), MIARA(5,"miara"); // < added ... }