Skip to content

Commit

Permalink
fix: 文字列のインスペクター表示がなかったので追加
Browse files Browse the repository at this point in the history
  • Loading branch information
pspkurara committed Sep 9, 2020
1 parent df851b8 commit 578fe8d
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,24 @@ public void DrawInspector(EditorSkinPartsPropertry property)
element.vector4Value = EditorGUILayout.Vector4Field(v.DisplayName, element.vector4Value);
}
break;
case SerializedPropertyType.Character:
{
var element = property.stringValues.GetArrayElementAtIndex(v.FieldIndex);
if (element.hasMultipleDifferentValues) EditorGUI.showMixedValue = true;
var str = element.stringValue;
if (str.Length > 0) str = str[0].ToString();
var resultStr = EditorGUILayout.TextField(v.DisplayName, str);
if (resultStr.Length > 0) resultStr = resultStr[0].ToString();
element.stringValue = resultStr;
}
break;
case SerializedPropertyType.String:
{
var element = property.stringValues.GetArrayElementAtIndex(v.FieldIndex);
if (element.hasMultipleDifferentValues) EditorGUI.showMixedValue = true;
element.stringValue = EditorGUILayout.TextField(v.DisplayName, element.stringValue);
}
break;
}
EditorGUI.showMixedValue = showMixedValue;
}
Expand Down

0 comments on commit 578fe8d

Please sign in to comment.