Tanoda
GILES.Serialization.pb_ComponentDiff Class Reference
Inheritance diagram for GILES.Serialization.pb_ComponentDiff:

Public Member Functions

 pb_ComponentDiff ()
 
void GetObjectData (SerializationInfo info, StreamingContext context)
 
 pb_ComponentDiff (SerializationInfo info, StreamingContext context)
 
void ApplyPatch (GameObject target)
 

Static Public Member Functions

static void AddDiff (Component component, string name, object value)
 

Public Attributes

Dictionary< Component, Dictionary< string, object > > modifiedValues
 

Detailed Description

Stores a dictionary of modified values and their corresponding component. This is used to serialize changes to prefabs without writing the entirity of their serialized data to disk.

Definition at line 14 of file pb_ComponentDiff.cs.

Constructor & Destructor Documentation

◆ pb_ComponentDiff() [1/2]

GILES.Serialization.pb_ComponentDiff.pb_ComponentDiff ( )

Definition at line 18 of file pb_ComponentDiff.cs.

◆ pb_ComponentDiff() [2/2]

GILES.Serialization.pb_ComponentDiff.pb_ComponentDiff ( SerializationInfo  info,
StreamingContext  context 
)

Serialized constructor.

Definition at line 43 of file pb_ComponentDiff.cs.

Member Function Documentation

◆ AddDiff()

static void GILES.Serialization.pb_ComponentDiff.AddDiff ( Component  component,
string  name,
object  value 
)
static

Add a diff entry for a component. component points to the edited component, name is the variable name, and value is the new value.

Definition at line 54 of file pb_ComponentDiff.cs.

◆ ApplyPatch()

void GILES.Serialization.pb_ComponentDiff.ApplyPatch ( GameObject  target)

Called after an object is deserialized. This interates through components and sets the modified values, while simultaneously rebuilding modifiedValues so that the keys point to actual component objects.

if a component has multiple instances on an object, this will make sure that they remain distinct (probably)

Definition at line 85 of file pb_ComponentDiff.cs.

◆ GetObjectData()

void GILES.Serialization.pb_ComponentDiff.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)

Serialization override.

Definition at line 29 of file pb_ComponentDiff.cs.

Member Data Documentation

◆ modifiedValues

Dictionary<Component, Dictionary<string, object> > GILES.Serialization.pb_ComponentDiff.modifiedValues

Definition at line 16 of file pb_ComponentDiff.cs.


The documentation for this class was generated from the following file: