This version of DeltaMonitor is meant specifically for monitoring the members of UnityEngine.Objects, thus it's namespace. Requiring the monitored object to be a UnityEngine.Object allows it's reference to be serialized by Unity, unlike in ancestor classes.
Public Member Functions | |
DeltaMonitorUnityObject (UnityEngine.Object _objectToMonitor) | |
Creates a new DeltaMonitorUnity Object, that will monitor the provided object for changes in members that have DeltaAttributes. | |
override void | OnAfterDeserialize () |
Puts the Serializable monitoredObject field into the live base class member, base.objectToMonitor , then calls the base class version. | |
override void | OnBeforeSerialize () |
Stores the monitored object reference in he Serializable monitoredObject field, then calls the base class version. | |
![]() | |
DeltaMonitorSerialized (object _objectToMonitor) | |
Creates a DeltaMonitorUnity Object, that will monitor the provided object for changes in members that have DeltaAttributes. | |
![]() | |
DeltaMonitor (object _objectToMonitor) | |
Performs the same functions as Init(), once the object is instantiated. But, also, once initialized, sets all attributes to be "enabled". | |
void | ApplyMaxSet (int newMaxSet) |
this function is used to specify a new MaxSet value. Only Delta attribute with an assigned set LOWER than or equal to the MaxSet, will be checked for changes. | |
void | DeserializedDetectionEnabledList () |
Reads from SelectOptions string array and for every DeltaAttribue named on the list, sets them to enabled. Existing DeltaAttribue that are NOT named by the list, are set to NOT enabled. | |
bool | DetectChanges () |
One of the primary functions for this class, it will check attributes to see if their value has changed. | |
bool | DetectChangesInSet (int set) |
Will check all stored attributes to see if their value has changed. Only DeltaAttributes that have been assigned to the specified SetID will be checked. | |
DeltaAttribute | GetDeltaAtrributeByAttributeName (string attributeConditionalName) |
Attempts to get the detltaAttribute in the same class as the called DeltaMonitor, using the name defined in the attribute, and returns it. | |
void | Init (object _objectToMonitor) |
Given the objectToMonitor, which will be stored internally(but not serialized), Init() generates a list of all CheckForChangeAttribute attributes in that object's class, which will allow us access the attributed variable's value. This function will initialize the non-serialized variables of this class, and update the OptionNames's fullList It will also read the serialized OptionNames's "selected" List and enable/disable each attribute appropriately by calling ApplySerializedDetectionEnabledList(); | |
void | RenameConditionalOptionName (string OriginalConidtionName, string newConditionName) |
This function is used to change the display names of a given DeltaAttribute. This can be useful if one wants to change the displayed option name of derived class versions of a variable's delta detector. Assumes the Delta monitor has been initialized. If the originaConditionName is not found, does nothing. | |
void | ResetValues () |
One of the primary functions for this class, it will reset the values of all stored attributes. This is done by overwriting the internal DeltaAttribute cache with the current variable value. This new value will thereafter be used for comparison during change detection. | |
void | ResetValuesInSet (int set) |
Will reset the values of all stored attributes that have the provided SetID. This is done by overwriting the internal DeltaAttribute cache with the current variable value. This new value will thereafter be used for comparison during change detection. | |
void | SerializeDetectionEnabledList () |
Reads from run-time attributes array, and writes the name of all enabled attributes into the serialized, selectedOptions string array. | |
Properties | |
UnityEngine.Object | MonitoredObject [get, set] |
This Object reference can be serialized by unity since it is a UnintyEngine.Object. It is set with the constructor, and thereafter should not be changed by the user. During Serialization, this object reference is used to set or store the base class's objectToMonitor member. | |
Additional Inherited Members | |
![]() | |
bool | changeResult |
Publicly over-writable. If set to true, will remain so until DetectChanges or DetectChangesInSet is called. | |
int | CurrentMaxSet |
If this variable is not negative; it will be used to limit the DeltaAttributes checked to include only items in a set lower than or equal to this number. | |
OptionNames | detectionEnabledList |
This is one of the only serialized field; The fullList member of the OptionNames will be overwritten upon Init(), with the current CheckForChangeAttribute names in the objectToMonitor's class Note: OptionNames class has it's own property drawer in EyE.UnityEditor | |
DeltaAttribute[] | fieldsToCheckForChange |
These members are passed to or initialized inside the constructor or Init() function. | |
bool | initialized |
Set to false when instantiated. Set to true during initialization. This distinction is important when DeltaMonitor is loaded from disk; it is instantiated, but not initialized. | |
![]() | |
object | objectToMonitor |
This is the object that contains variables with CheckForChangeAttributes, and is assigned during construction. These attributes will be extracted and recorded during initialization, and at runt-time is internally used to check for changes in each. | |