Class used to store the values of any provided transform, and all it's children. While the hierarchy information of the transforms is NOT recorded, the order through which they are iterated IS. Values stored here can be compared against the same or another transform, to see if the values in the transforms, as recorded in their initial order, have changed. This is the primary use intended for this class. Values CAN be restored to the Transform, but only if it's children-hierarchy has not changed. If this is unsuitable, you may choose to, instead of this class, use a TransformTree, which mitigates this somewhat, or a TransformDictionaryStorage structure instead. Since the hierarchy is not actually stored with the TransformAndDecendantStorage, it cannot be used to recreate the hierarchy.
|
| TransformAndDecendantStorage (Transform transform_to_copy) |
| Instantiate a new TransformAndChildrenStorage object. Requires a transform that will supply the data to be stored. Usually it will be more efficient to use the Implicit cast operator, rather than this constructor.
|
|
void | AssignToTransform (Transform transformToAssignTo, bool restoreRootLocalNotWorld=false) |
| Use to assign the values stored in the TransformAndChildrenStorage to an actual UnityEngine.Transform Caution should be used when using this function, if the transform hierarchy has changed since the values were recorded, it's probable values will be restored to the wrong transform.
|
|
override bool | Equals (object objectToCompare) |
| Generalized version of equality function. Determines if the object to compare is a Transform or TransformAndChildrenStorage. If so it compares each transform element for equality. If all element match it returns true.
|
|
bool | Equals (Transform transformToCheck) |
| Use to compare with an existing transform. Compare local coordinate values in the transform and all children to see if they match.
|
|
bool | Equals (Transform transformToCheck, 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.
|
|
bool | Equals (TransformAndDecendantStorage storageToCheck) |
| Use to compare with another existing TransformAndChildrenStorage. Compare values in both storage objects, including all descendants, to see if they match.
|
|
IEnumerator< StoredTransform > | GetEnumerator () |
| Default GetEnumerator
|
|
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 no there is performance gain from using Hash Tables.
|
|
void | StoreTransformAndChildren (Transform transformToStore) |
| Function used to store transform and all the children (and their children,recursively) in a transform.
|
|
override string | ToString () |
| Output transform storage as single line string, useful for debugging.
|
|
string | ToString (bool includeNewlines=true) |
| Output transform storage as single line string, useful for debugging.
|
|
|
static implicit | operator TransformAndDecendantStorage (Transform transform_to_copy) |
| Casting a transform to this class, instantiates a new TransformAndChildrenStorage object. Requires a transform that will supply the data to be stored.
|
|