Class is almost identical to a TransformDictonaryStorage, with the exception that Equal's will always check the local values of children transforms, and will only check children transform for equality, Note: this class WILL store and restore the transform of the object as well as the children, it will only CHECK equality against children.
Public Member Functions | |
TransformChildrenDictionaryStorage () | |
Calls base version of constructor. | |
TransformChildrenDictionaryStorage (Transform transformToStore) | |
Constructor Generates the TransformStorageDictionary using the provided transform. | |
override bool | Equals (Transform compareTransform) |
Specific version of equality function used to compare with a Transform object. It will compare local coordinates of all stored transforms. | |
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 Root StoredTransform with the Transform's world coordinates, or not. | |
![]() | |
TransformDictionaryStorage () | |
Creates an empty TransformDictionaryStorage object, that does not reference any transforms. | |
TransformDictionaryStorage (Transform transformToStore) | |
Constructor Generates the TransformStorageDictionary using the provided transform. | |
void | AssignToTransform (Transform transformToAssignTo, bool restoreRootLocalNotWorld=false) |
Use to assign the values stored in the TransformStorageTree to an actual UnityEngine.Transform. NOTE: Unlike other IStoreTransformHeirarchy variants, this function does not consider the order of the descendant hierarchy, which may safely be changed. However, it DOES assume that the transform Objects that existed when the transform was recorded, remain in existence now. If the original transform no longer exists, the StoredTransform value will NOT be assigned. 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. | |
new 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) |
this function is called to Store a transform Object in the StoredTransform Object. All descendants of the transform will be added to the tree, appropriately. | |
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. | |
![]() | |
LocalTransformDictionayStorage () | |
Default constructor. Invokes base constructor and thats it. | |
LocalTransformDictionayStorage (int count) | |
Constructor used to Initialize the data structure with specific number of elements | |
![]() | |
SerializableDictionary () | |
Default Constructor. Initializes the Dictionary with zero elements. | |
SerializableDictionary (int len=0) | |
Initializes the Dictionary with a number of elements allocated, but does not assign any elements. | |
void | Add (KeyValuePair< TKeyType, TValueType > item) |
adds the provided KeyValuePair{TKeyType, TValueType} to the dictionary. This object contains BOTH the key, and the value to be stored. if the key already exists in the dictionary an exception will be thrown. | |
void | Add (TKeyType key, TValueType value) |
Add the provided key/value pair to the dictionary | |
void | Clear () |
Removes all keys and values from the dictionary. | |
bool | Contains (KeyValuePair< TKeyType, TValueType > item) |
check if the dictionary contains the key specified, and if so, that the value associated with the key also matches the value in the provided parameter. | |
bool | ContainsKey (TKeyType key) |
Checks to see if the specified key already exists in the dictionary | |
void | CopyTo (KeyValuePair< TKeyType, TValueType >[] array, int arrayIndex) |
Used to copy the collection Keys and Values into an array of KeyValuePair{TKeyType, TValueType} | |
void | EditorAdd () |
After checking IsEditorAddKeyValid, the two new entry keys editorNewKeyValue and editorNewValueValue, will be used to create a new entry in the dictionary. | |
IEnumerator< KeyValuePair< TKeyType, TValueType > > | GetEnumerator () |
Used to get an IEnumerator{KeyValuePair{TKeyType, TValueType}} for use in iterating through the dictionary's KeyValuePairs | |
void | OnAfterDeserialize () |
Required to implement the unity ISerializationCallbackReceiver. It will convert the serialized list data into a runtime dictionary. | |
void | OnBeforeSerialize () |
Required to implement the unity ISerializationCallbackReceiver. It will convert the runtime dictionary into a simple serialize list that can be stored by unity. | |
bool | Remove (KeyValuePair< TKeyType, TValueType > item) |
Removes the specified key-value pair from the dictionary. | |
bool | Remove (TKeyType key) |
Removes the specified key, and it's associated value, from the dictionary | |
bool | TryGetValue (TKeyType key, out TValueType value) |
Will attempt to get the value associated with the provided key. If found the function will put the value into the out parameter, value, then return true. If the key is not found in the dictionary, the function will return false, and the default value of TValueType will be put into the out parameter, value. | |
Additional Inherited Members | |
![]() | |
static implicit | operator TransformDictionaryStorage (Transform transform_to_copy) |
Instantiate a new TransformDictionaryStorage object. Requires a transform (with possible children) that will supply the data to be stored. | |
![]() | |
StoredTransform | rootWorldTransform |
the world transform member represents the world transform of the root object | |
Transform | rootWorldTransformReference |
In addition to the local transform references stored in the localTransforms dictionary, this will identify which of those is the root object (for optional compare and assignment). | |
![]() | |
TKeyType | editorNewKeyValue |
This field exists for use by the propertyDrawer. It provides a place to store a new entry's Key information | |
TValueType | editorNewValueValue |
This field exists for use by the propertyDrawer. It provides a place to store a new entry's Value information | |
List< TKeyType > | pairKList |
Serialized version of the Key data, synchronized with the dictionary during serialization. This is what gets saved to disk, not the runtime dictionary. | |
List< TValueType > | pairVList |
Serialized version of the Value data, synchronized with the dictionary during serialization. This is what gets saved to disk, not the runtime dictionary. | |
![]() | |
int | Count [get] |
returns the number of Keys in the dictionary | |
bool | IsEditorAddKeyValid [get] |
ReadOnly property that return True, if the new entry key editorNewKeyValue does not already exist in the dictionary. The new key value may not be null. | |
bool | IsReadOnly [get] |
Returns true is the dictionary is ReadOnly | |
ICollection< TKeyType > | Keys [get] |
returns the all the Keys in the dictionary as a Collection | |
TValueType | this[TKeyType key] [get, set] |
This indexer is used to find a Particular Value in the dictionary associated with the provided key | |
ICollection< TValueType > | Values [get] |
returns the all Values in the dictionary as a Collection | |