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

Public Member Functions

void Initialize (InternalValueBaker baker)
 
void WindowStartup (Action startupAction=null)
 
void Initialize (T baker)
 Initialization method More...
 

Public Attributes

const string DEFAULTNAME = "InternvalValueSelectWindow"
 
const string CACHENAME = "InternalScriptHiarachies"
 

Package Functions

void CloseOverload ()
 
void UpdateSettings ()
 
PropertyInspectorCustomEditorWindow OpenWindow (ref InternalValueBaker.PropertyInfo target, int index)
 

Static Package Functions

static void UpdateSettings (ref InternalValueRewizeWindowCache cache)
 

Package Attributes

IBaker< InternalValueBaker.PropertyInfom_AttachedScript
 

Properties

bool WindowStarted [get]
 
bool Initialized [get, set]
 
Action Clear [set]
 Clear function callback from Custom editor script code More...
 

Member Function Documentation

◆ CloseOverload()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.CloseOverload ( )
package
229  {
230  InternalValueRewizeSettings setting =
231  EditorRewizeSystemUtility.GetSetting<InternalValueRewizeSettings>(
232  PropertySelectionEditorWindow.DEFAULTNAME);
233  setting.Active = false;
234  EditorRewizeSystemUtility.SaveDirtyObject(setting);
235  AssetDatabase.SaveAssets();
236 
237  Close();
238  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize() [1/2]

void MarkOostveen.TimeRewizer.Editor.Baking.IBakeWindow< T >.Initialize ( baker)
inherited

Initialization method

Parameters
baker

◆ Initialize() [2/2]

void MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.Initialize ( InternalValueBaker  baker)
39  {
40  m_AttachedScript = baker;
41  m_ScrolPosition = new Vector2();
42 
43  Initialized = true;
44  }

◆ OpenWindow()

PropertyInspectorCustomEditorWindow MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.OpenWindow ( ref InternalValueBaker.PropertyInfo  target,
int  index 
)
package
333  {
334  Type fieldtype = target.m_FieldInfo.FieldType;
335  Type valueType = typeof(InternalValueBaker.PropertyValue<>);
336  valueType = valueType.MakeGenericType(fieldtype);
337 
338  Type listtype = typeof(List<>);
339  listtype = listtype.MakeGenericType(valueType);
340 
341  if (target.m_Values == null)
342  {
343  target.m_Values = RewizeUtilityFunctions.CreateInstanceByType(listtype);
344  }
345 
346  PropertyInspectorCustomEditorWindow[] windows =
347  Resources.FindObjectsOfTypeAll<PropertyInspectorCustomEditorWindow>();
348 
349  PropertyInspectorCustomEditorWindow newwindow = null;
350  bool active = false;
351  for (int i = windows.Length - 1; i >= 0; i--)
352  {
353  if (windows[i].titleContent.text == target.m_FieldInfo.Name)
354  {
355  newwindow = windows[i];
356  active = true;
357  break;
358  }
359  }
360 
361  if (!active)
362  {
363  newwindow = CreateInstance<PropertyInspectorCustomEditorWindow>();
364  newwindow.titleContent = new GUIContent(target.m_FieldInfo.Name);
365  }
366 
367  newwindow?.ShowUtility();
368  newwindow?.Initialize(index, m_AttachedScript as InternalValueBaker, fieldtype, listtype);
369  newwindow?.Repaint();
370 
371  return newwindow;
372  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateSettings() [1/2]

void MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.UpdateSettings ( )
package
241  {
242  InternalValueRewizeWindowCache cache =
243  EditorRewizeSystemUtility.GetCache<InternalValueRewizeWindowCache>(m_AttachedScript.Gameobject,
244  PropertySelectionEditorWindow.CACHENAME);
245  PropertySelectionEditorWindow.UpdateSettings(ref cache);
246  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateSettings() [2/2]

static void MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.UpdateSettings ( ref InternalValueRewizeWindowCache  cache)
staticpackage
249  {
250  //Set Recording Boolean
251  if (!Application.isPlaying)
252  {
253  InternalValueRewizeSettings settings =
254  EditorRewizeSystemUtility.GetSetting<InternalValueRewizeSettings>(PropertySelectionEditorWindow
255  .DEFAULTNAME);
256 
257  for (int i = 0; i < cache.m_RecordingWindows.Count; i++)
258  {
259  if (cache.m_RecordingWindows[i])
260  {
261  settings.Recording = true;
262  break;
263  }
264  }
265 
266  EditorRewizeSystemUtility.SaveDirtyObject(settings);
267  EditorRewizeSystemUtility.SaveDirtyObject(cache);
268  AssetDatabase.SaveAssets();
269  }
270  }
+ Here is the call graph for this function:

◆ WindowStartup()

void MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.WindowStartup ( Action  startupAction = null)
47  {
48  EditorRewizerDebug.Log("Starting window start coroutine");
49  ((InternalValueBaker)m_AttachedScript).StartCoroutine(StartWindows(startupAction));
50  Assembly assembly = typeof(EditorWindow).Assembly;
51  Type type = assembly.GetType("UnityEditor.GameView");
52  EditorWindow gameview = GetWindow(type);
53  gameview.Repaint();
54  }
+ Here is the call graph for this function:

Member Data Documentation

◆ CACHENAME

const string MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.CACHENAME = "InternalScriptHiarachies"

◆ DEFAULTNAME

const string MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.DEFAULTNAME = "InternvalValueSelectWindow"

◆ m_AttachedScript

IBaker<InternalValueBaker.PropertyInfo> MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.m_AttachedScript
package

Property Documentation

◆ Clear

Action MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.Clear
set

Clear function callback from Custom editor script code

32 { private get; set; }

◆ Initialized

bool MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.Initialized
getset
27 { get; set; }

◆ WindowStarted

bool MarkOostveen.TimeRewizer.Editor.Baking.PropertySelectionEditorWindow.WindowStarted
get
26 { get; private set; }