Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker Class Reference

Baker used to baking internal script variables More...

+ Inheritance diagram for MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker:
+ Collaboration diagram for MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker:

Classes

struct  PropertyInfo
 Struct containing information about a internal script variable aswell as it's cached snapshots More...
 
struct  PropertyValue
 struct to store value of a snapshot into More...
 

Public Member Functions

void SaveChanges ()
 save changes for all snapshots More...
 
void Load ()
 load all variables from attached scripts on gameobject that are serialized and also are not generic More...
 

Static Public Member Functions

static PropertyInfo Convert (PropertyInfo input)
 convert More...
 

Public Attributes

GameObject Gameobject => gameObject
 Linked Gameobject More...
 

Properties

List< PropertyInfoSnapshots [get, set]
 Snapshot list contained by baker More...
 
Action< string > Save [set]
 Save Action Function More...
 
dynamic BaseBaker [get, set]
 Scriptable Cache obj, this object is dynamic since we can't access unityeditor from a dll which will be in the final build More...
 

Detailed Description

Baker used to baking internal script variables

Member Function Documentation

◆ Convert()

static PropertyInfo MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.Convert ( PropertyInfo  input)
static

convert

Parameters
input
Returns
89  {
90  return input;
91  }
+ Here is the caller graph for this function:

◆ Load()

void MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.Load ( )

load all variables from attached scripts on gameobject that are serialized and also are not generic

47  {
48  PropertyInfo[] properties = Objectrewindables();
49 
50  for (int i = 0; i < Snapshots.Count && i < properties.Length; i++)
51  {
52  PropertyInfo info = Snapshots[i];
53  PropertyInfo newinfo = properties[i];
54 
55  if (info.m_FieldInfo != newinfo.m_FieldInfo)
56  {
57  info.m_FieldInfo = newinfo.m_FieldInfo;
58  }
59 
60  if (info.m_Tag != newinfo.m_Tag)
61  {
62  info.m_Tag = newinfo.m_Tag;
63  }
64 
65  if (newinfo.m_Instance != null)
66  info.m_Instance = newinfo.m_Instance;
67 
68  if (newinfo.m_Parent != null)
69  {
70  info.m_Parent = newinfo.m_Parent;
71  info.m_Instance = info.m_FieldInfo.GetValue(newinfo.m_Parent);
72  }
73 
74  Snapshots[i] = info;
75  }
76 
77  for (int i = Snapshots.Count; i < properties.Length; i++)
78  {
79  Snapshots.Add(properties[i]);
80  }
81  }

◆ SaveChanges()

void MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.SaveChanges ( )

save changes for all snapshots

39  {
40  Save.Invoke(name);
41  }
+ Here is the caller graph for this function:

Member Data Documentation

◆ Gameobject

GameObject MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.Gameobject => gameObject

Linked Gameobject

Property Documentation

◆ BaseBaker

dynamic MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.BaseBaker
getset

Scriptable Cache obj, this object is dynamic since we can't access unityeditor from a dll which will be in the final build

28 { get; set; }

◆ Save

Action<string> MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.Save
set

Save Action Function

22 { private get; set; }

◆ Snapshots

List<PropertyInfo> MarkOostveen.TimeRewizer.Editor.Baking.InternalValueBaker.Snapshots
getset

Snapshot list contained by baker

17 { get; set; }