Nanashi-soft○プログラマ専用○Unityでゲーム開発○
string[] partslist={"PARTS_01_FACE_001","PARTS_01_EYE_001","PARTS_01_EYE_BALL_001","PARTS_01_BROW_001","PARTS_01_MOUTH_001","PARTS_01_NOSE_001","PARTS_01_EAR_001","PARTS_01_HAIR_FRONT_001","PARTS_01_HAIR_SIDE_001","PARTS_01_HAIR_BACK_001","PARTS_01_NECK","PARTS_01_BODY","PARTS_01_BACKGROUND","PARTS_01_CORE"};
if(acnt <= 1.0f){
acnt += 1.0f * Time.deltaTime;
foreach(string var in partslist){
live2DModel.setPartsOpacity(var, acnt);
}
}
パーツID配列を作る時は,先ほどのパーツ設定ダイアログの右下にある『>』ボタンをクリックして,『テキストで表示』をクリックacnt += 1.0f * Time.deltaTime;
if(acnt <= 1.0f){
foreach(string var in partslist){
live2DModel.setPartsOpacity(var, 1.0f - acnt);
}
}
パーツIDは存在しないものを指定してもエラーにはなりません