13 [AttributeUsage(AttributeTargets.Property)]
16 public string CustomLabel {
get;
private set; }
20 CustomLabel = customLabel;
24 public override void DrawEditor(
UnityEngine.Object target, FieldInfo field, SerializedProperty property)
27 throw new NotImplementedException();
30 public override void DrawEditor(
UnityEngine.Object target, PropertyInfo prop)
32 switch (prop.PropertyType.Name)
35 bool boolValue = (bool)prop.GetValue(target, null);
36 boolValue = EditorGUILayout.Toggle(!
string.IsNullOrEmpty (CustomLabel) ? CustomLabel : SplitCamelCase(prop.Name), boolValue);
37 prop.SetValue(target, boolValue, null);
41 int intValue = (int)prop.GetValue(target, null);
42 intValue = EditorGUILayout.IntField(!
string.IsNullOrEmpty(CustomLabel) ? CustomLabel : SplitCamelCase(prop.Name), intValue);
43 prop.SetValue(target, intValue, null);
47 float singleValue = (float)prop.GetValue(target, null);
48 singleValue = EditorGUILayout.FloatField(!
string.IsNullOrEmpty(CustomLabel) ? CustomLabel : SplitCamelCase(prop.Name), singleValue);
49 prop.SetValue(target, singleValue, null);
53 throw new NotImplementedException(
"No drawer for type " + prop.PropertyType.Name);