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

Package Functions

void Initialize (int index, InternalValueBaker attachedscript, Type snapshotValueType, Type listtype)
 
void UpdateSettings ()
 

Package Attributes

InternalValueBaker m_AttachedScript
 
Type m_ListType
 
Type m_RecorderType
 
Type m_VariableType
 

Properties

InternalValueBaker.PropertyInfo PropertyInfo [get, set]
 
InternalValueRewindRecorder Recorder [get]
 
PlayModeStateChange NewMode [get]
 
bool Initialized [get]
 

Member Function Documentation

◆ Initialize()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.Initialize ( int  index,
InternalValueBaker  attachedscript,
Type  snapshotValueType,
Type  listtype 
)
package
43  {
44  m_AttachedScript = attachedscript;
45  m_Property = attachedscript.Snapshots[index];
46  m_Index = index;
47  m_VariableType = snapshotValueType;
48  m_ListType = listtype;
49  EditorRewizerDebug.Log("Initialized Internal Rewind window for variable: " + m_Property.m_FieldInfo.Name);
50 
51  if (m_Property.m_Values == null)
52  {
53  m_Property.m_Values = RewizeUtilityFunctions.CreateInstanceByType(
54  typeof(List<>).MakeGenericType(
55  typeof(InternalValueBaker.PropertyValue<>).MakeGenericType(m_Property.m_FieldInfo.FieldType)));
56  }
57 
58  m_AttachedScript.Snapshots[index] = m_Property;
59 
60  //Create Recorder
61  object compareinstance = Bake.InternalValueGetTypes(m_Property).createinstancefunction.Invoke(null,
62  new object[]
63  {((dynamic) RewizeUtilityFunctions.CreateInstanceByType(m_VariableType))?.GetEditorValue()});
64  m_RecorderType = typeof(InternalValueRewizeRecorder<>).MakeGenericType(compareinstance.GetType().GetGenericArguments()[0]);
65  Recorder = RewizeUtilityFunctions.CreateInstanceByType(m_RecorderType) as InternalValueRewindRecorder;
66  Recorder.Initialize(this);
67  InternalValueRewizeWindowCache cache =
68  EditorRewizeSystemUtility.GetCache<InternalValueRewizeWindowCache>(m_AttachedScript.gameObject,
69  PropertySelectionEditorWindow.CACHENAME);
70  if (cache.m_RecordingWindows.Count - 1 < m_Index)
71  {
72  cache.m_RecordingWindows.Add(false);
73  }
74  else
75  {
76  Recorder.Recording = cache.m_RecordingWindows[m_Index];
77  }
78 
79  m_Property.m_Recording = Recorder.Recording;
80  EditorRewizerDebug.Log("Created Recorder for recording object of type: " + compareinstance.GetType());
81 
82  m_Hierarchy = new PropertyHierarchyEditorWindow();
83  m_Hierarchy.Initialize(this);
84 
85  if (!Verification(ref m_Property))
86  {
87  if (m_Property.m_Instance != null)
88  {
89  EditorRewizerDebug.Log("Type Changed, removed bake form obj");
90  m_Property.m_Instance.PreLoadInfo = null;
91  }
92  }
93  else
94  {
95  EditorRewizerDebug.Log("Bake still compatible");
96  }
97 
98  EditorApplication.playModeStateChanged += PlayModeChanged;
99 
100  Initialized = true;
101  }
+ Here is the call graph for this function:

◆ UpdateSettings()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.UpdateSettings ( )
package
222  {
223  InternalValueRewizeWindowCache cache =
224  EditorRewizeSystemUtility.GetCache<InternalValueRewizeWindowCache>(m_AttachedScript.gameObject,
225  PropertySelectionEditorWindow.CACHENAME);
226 
227  if (cache.m_RecordingWindows.Count - 1 < m_Index)
228  {
229  cache.m_RecordingWindows.Add(Recorder.Recording);
230  }
231  else
232  {
233  cache.m_RecordingWindows[m_Index] = Recorder.Recording;
234  }
235 
236  PropertySelectionEditorWindow.UpdateSettings(ref cache);
237  }
+ Here is the call graph for this function:

Member Data Documentation

◆ m_AttachedScript

InternalValueBaker MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.m_AttachedScript
package

◆ m_ListType

Type MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.m_ListType
package

◆ m_RecorderType

Type MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.m_RecorderType
package

◆ m_VariableType

Type MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.m_VariableType
package

Property Documentation

◆ Initialized

bool MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.Initialized
get
40 { get; private set; }

◆ NewMode

PlayModeStateChange MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.NewMode
getpackage
38 { get; private set; }

◆ PropertyInfo

InternalValueBaker.PropertyInfo MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.PropertyInfo
getsetpackage
24  {
25  set
26  {
27  m_Property = value;
28  List<InternalValueBaker.PropertyInfo> snapshots = m_AttachedScript.Snapshots;
29  snapshots[m_Index] = m_Property;
30  m_AttachedScript.Snapshots = snapshots;
31  }
32 
33  get => m_Property;
34  }

◆ Recorder

InternalValueRewindRecorder MarkOostveen.TimeRewizer.Editor.Baking.PropertyInspectorCustomEditorWindow.Recorder
getpackage
36 { get; private set; }