3using System.Collections;
4using System.Collections.Generic;
5using System.Reflection;
13 [pb_TypeInspector(typeof(
object))]
19 private const int VERTICAL_LAYOUT_SPACING = 0;
28 value = GetValue<object>();
30 pb_GUIUtility.AddVerticalLayoutGroup(gameObject,
new RectOffset(0,0,0,0), VERTICAL_LAYOUT_SPACING,
true,
false);
43 void BuildInspectorTree()
45 if(declaringType ==
null)
47 Debug.LogWarning(
"Inspector is targeting a null or primitive type with no available pb_TypeInspector override, or target is null and using delegates in the parent inspector.");
51 string name = GetName();
52 name = name.Substring(name.LastIndexOf(
".") + 1);
54 GameObject subpanel = pb_GUIUtility.CreateLabeledVerticalPanel(name);
55 subpanel.GetComponent<VerticalLayoutGroup>().padding =
new RectOffset(2,2,2,2);
56 subpanel.transform.SetParent(transform);
58 foreach(PropertyInfo prop
in pb_Reflection.GetSerializableProperties(declaringType, BindingFlags.Public | BindingFlags.Instance))
60 var temp = pb_InspectorResolver.AddTypeInspector(value, subpanel.transform, prop,
null);
66 foreach(FieldInfo field
in pb_Reflection.GetSerializableFields(declaringType, BindingFlags.Public | BindingFlags.Instance))
69 var temp = pb_InspectorResolver.AddTypeInspector(value, subpanel.transform,
null, field);
override void OnUpdateGUI()
override void InitializeGUI()
void OnValueChange(object val)