Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector Class Reference
+ Inheritance diagram for MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector:
+ Collaboration diagram for MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector:

Package Functions

void Initialize (ref InternalValueBaker.PropertyInfo property, int index)
 
void Update (InternalValueBaker.PropertyInfo property)
 

Properties

bool Initialized [get, set]
 

Member Function Documentation

◆ Initialize()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector.Initialize ( ref InternalValueBaker.PropertyInfo  property,
int  index 
)
package
18  {
19  m_Index = index;
20 
21  Type genericFieldType = Bake.InternalValueGetTypes(property).ValueType;
22 
23  Type editorType = InternalValuePropertyReferencedEdtiors.GetEditorType(genericFieldType);
24 
25  if (editorType != null)
26  {
27  EditorRewizerDebug.Log("Generic m_Value Editor Type Found!: " + editorType);
28  m_Inspector = UnityEditor.Editor.CreateEditor(property.m_Parent, editorType);
29  ((dynamic)m_Inspector).TargetValue = property.m_Values[m_Index].m_Value.Value;
30  }
31  else
32  {
33  EditorRewizerDebug.Log("No Generic m_Value Editor Type Found for" + property.m_FieldInfo.FieldType);
34  }
35 
36  Initialized = true;
37  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector.Update ( InternalValueBaker.PropertyInfo  property)
package
40  {
41  if (Initialized)
42  {
43  if (m_Inspector != null)
44  {
45  m_Inspector.OnInspectorGUI();
46  m_Inspector.Repaint();
47 
48  property.m_Values[m_Index].m_Value.Value = ((dynamic)m_Inspector).TargetValue;
49  }
50  else
51  {
52  GUILayout.Label("Type not supported please define a custom editor window for type: " +
53  Bake.InternalValueGetTypes(property).ValueType);
54  }
55 
56  EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
57  }
58  }
+ Here is the caller graph for this function:

Property Documentation

◆ Initialized

bool MarkOostveen.TimeRewizer.Editor.Baking.PropertyValueInspector.Initialized
getset
15 { get; set; }