Stores a transform, and it's descendant transforms as a navigable tree or local transformations. Similar to the TreeOfLocalTransforms it derives from, but also includes and uses the global transform of the root node.

Public Member Functions

 TransformStorageTree (Transform transformToStore)
 Constructor that creates a TransformStorageTree using the provided Unity Transform.
 
override void AssignToTransform (Transform transformToAssignTo, bool restoreRootLocalNotWorld=true)
 Use to assign the values stored in the TransformStorageTree to an actual UnityEngine.Transform. NOTE: This function assumes the hierarchy, including order, of the transform's descendants has not changed since recording it.
Any nodes no longer exist in the transform's descendants will be ignored: no new node in the transform will be created. If new transforms have been added as children in front of recorded child transform, they will be overwritten, For that, see the WriteTransformHeirarchy(Transform) function.
 
override bool Equals (object objectToCompare)
 Generalized version of equality function. Determines if the object to compare is a Transform or TransformStorageTree. If so it compares each transform element for equality. If all element match it returns true.
 
override bool Equals (Transform compareTransform)
 Specific version of equality function used to compare with a Transform object. This version does not allows the caller to specify weather to compare the StoredTransform with the Transforms local or world coordinates, it will always compare local.
 
override bool Equals (Transform compareTransform, bool localNotWorld)
 Use to compare with an existing transform. Compare values in the transform and all children to see if they match. It allows the caller to specify weather to compare the StoredTransform with the Transforms local or world coordinates.
 
override int GetHashCode ()
 This struct has dynamic values, and therefore should not be used as a key. This function will simply return a constant, so there is no performance gain from using Hash Tables.
 
override void StoreTransformAndChildren (Transform transformToStore)
 This function is called to Store a transform Object in the TransformTree. All descendants of the transform will be added to the tree, appropriately.
 
override string ToString ()
 Writes the transformation values in the tree to a string.
 
- Public Member Functions inherited from TreeOfLocalTransforms
 TreeOfLocalTransforms (Transform transformToStore)
 Constructor that creates a TreeOfLocalTransforms using the provided Unity Transform.
 
override StoredTransform DefaultNodeData ()
 this function overridden to provide a default transformation storage value
 
- Public Member Functions inherited from SerializableTree< StoredTransform >
void OnAfterDeserialize ()
 This function is required by the ISerializationCallbackReceiver Interface. Called automatically via the interface, it will deserialize the stored data into the runtime structure.
 
void OnBeforeSerialize ()
 This function is required by the ISerializationCallbackReceiver Interface. Called automatically via the interface, it will serialize the runtime data for storage.
 

Static Public Member Functions

static implicit operator TransformStorageTree (Transform transform_to_copy)
 The implicit Transform assignment operator will create a new StoredTransform object, and assign it the local values of the provided Transform.
 
- Static Public Member Functions inherited from TreeOfLocalTransforms
static implicit operator TreeOfLocalTransforms (Transform transform_to_copy)
 The implicit Transform assignment operator will create a new TreeOfLocalTransforms object, and assign it the local values of the provided Transform.
 

Public Attributes

StoredTransform rootWorldTransform
 The root StoredTransform is the only one that we stores a WORLD transformation for.
 
+ Inheritance diagram for TransformStorageTree:
+ Collaboration diagram for TransformStorageTree: