//色を設定するGUIを表示 protected void ShowColorGUI(AfterImageEffect2DPlayerBase player, bool isSameColor, int colorNum) { EditorGUI.indentLevel++; { if (isSameColor) { player.SetColorIfneeded(EditorGUILayout.ColorField(_isJapanese ? "残像の色" : "After Image Color", player.GetColor(0))); } else { List <Color> colorList = new List <Color>(); for (int i = 0; i < colorNum; i++) { string noText = (i + 1).ToString(); colorList.Add(EditorGUILayout.ColorField(_isJapanese ? noText + "つめの残像の色" : "Color" + noText, player.GetColor(i))); } player.SetColorListIfneeded(colorList); } } EditorGUI.indentLevel--; }
//マテリアルを設定するGUIを表示 protected void ShowMaterialGUI(AfterImageEffect2DPlayerBase player, MaterialType materialType, int materialNum) { EditorGUI.indentLevel++; { if (materialType == MaterialType.SameTarget) { player.SetMaterialIfneeded(null); } else if (materialType == MaterialType.Collective) { player.SetMaterialIfneeded(EditorGUILayout.ObjectField(_isJapanese ? "残像のマテリアル" : "After Image Material", player.GetMaterial(0), typeof(Material), true) as Material); } else if (materialType == MaterialType.Individual) { List <Material> materialList = new List <Material>(); for (int i = 0; i < materialNum; i++) { string noText = (i + 1).ToString(); materialList.Add(EditorGUILayout.ObjectField(_isJapanese ? noText + "つめの残像のマテリアル" : "Material" + noText, player.GetMaterial(i), typeof(Material), true) as Material); } player.SetMaterialListIfneeded(materialList); } } EditorGUI.indentLevel--; }