Summary
A dictionary of
Animancer.AnimancerState
s mapped to their Animancer.AnimancerState.Key
.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- I
Animation Clip Collection - IEnumerable
<AnimancerState>
- I
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IAnimationClipCollection"]
click Interface0 "/animancer/api/Animancer/IAnimationClipCollection"
Type-.->Interface1["IEnumerable<AnimancerState>"]
Type["AnimancerStateDictionary"]
class Type type-node
Syntax
public class AnimancerStateDictionary : IAnimationClipCollection, IEnumerable<AnimancerState>
Remarks
Documentation:
States
Properties
Name | Value | Summary |
---|---|---|
Count | int |
The number of states that have been registered with a
Animancer.AnimancerState.Key . |
Current | AnimancerState |
The
Animancer.AnimancerLayer.CurrentState on layer 0.
Specifically, this is the state that was most recently started using any of the Play methods on that layer.
States controlled individually via methods in the Animancer.AnimancerState itself will not register in
this property.
|
this[AnimancerState] | AnimancerState |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
The whole point of a key is to identify a state in the first place.
|
this[AnimationClip] | AnimancerState |
Calls
Animancer.AnimancerGraph.GetKey(UnityEngine.AnimationClip) then returns the state registered with that key. |
this[IHasKey] | AnimancerState |
Returns the state registered with the
Animancer.IHasKey.Key . |
this[Object] | AnimancerState |
Returns the state registered with the `key`.
|
Methods
Name | Value | Summary |
---|---|---|
Append |
void | |
Create |
ClipState |
Creates and returns a new
Animancer.ClipState to play the `clip`. |
Create |
ClipState |
Creates and returns a new
Animancer.ClipState to play the `clip` and registers it with the `key`.
|
CreateIfNew |
void |
Calls
Animancer.AnimancerStateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerStateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerStateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerStateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified `clips`. |
Destroy |
bool |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
Just call Animancer.AnimancerState.Destroy .
|
Destroy |
bool |
Calls
Animancer.AnimancerState.Destroy on the state associated with the `clip` (if any).
Returns true if the state existed.
|
Destroy |
bool |
Calls
Animancer.AnimancerState.Destroy on the state associated with the Animancer.IHasKey.Key
(if any). Returns true if the state existed.
|
Destroy |
bool |
Calls
Animancer.AnimancerState.Destroy on the state associated with the `key` (if any).
Returns true if the state existed.
|
DestroyAll |
void |
Calls
Animancer.AnimancerStateDictionary.Destroy(UnityEngine.AnimationClip) on all states gathered by
Animancer.IAnimationClipCollection.GatherAnimationClips(System.Collections.Generic.ICollection{UnityEngine.AnimationClip}) .
|
DestroyAll |
void |
Calls
Animancer.AnimancerStateDictionary.Destroy(UnityEngine.AnimationClip) on all states gathered by
UnityEngine.IAnimationClipSource.GetAnimationClips(System.Collections.Generic.List{UnityEngine.AnimationClip}) .
|
DestroyAll |
void |
Calls
Animancer.AnimancerStateDictionary.Destroy(UnityEngine.AnimationClip) on each of the `clips`. |
DestroyAll |
void |
Calls
Animancer.AnimancerStateDictionary.Destroy(UnityEngine.AnimationClip) on each of the `clips`. |
GatherAnimationClips |
void |
[
Animancer.IAnimationClipCollection ]
Adds all the animations of states with a Animancer.AnimancerState.Key to the `clips`.
|
GetClipMismatchError |
string |
Returns an error message explaining that a state already exists with the specified `key`.
static
|
GetEnumerator |
Dictionary |
Returns an enumerator that will iterate through all registered states.
|
GetOrCreate |
AnimancerState |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
The whole point of a key is to identify a state in the first place.
|
GetOrCreate |
AnimancerState |
Calls
Animancer.AnimancerGraph.GetKey(UnityEngine.AnimationClip) and returns the state registered with that key
or creates one if it doesn't exist.
|
GetOrCreate |
AnimancerState |
Returns the state registered with the `transition`s
Animancer.IHasKey.Key if there is one.
Otherwise this method uses Animancer.ITransition.CreateState to create a new one
and registers it with that key before returning it.
|
GetOrCreate |
AnimancerState |
Returns the state which registered with the `key` or creates one if it doesn't exist.
If the state already exists but has the wrong
Animancer.AnimancerState.Clip , the `allowSetClip`
parameter determines what will happen. False causes it to throw an System.ArgumentException
while true allows it to change the Animancer.AnimancerState.Clip .
Note that the change is somewhat costly to performance so use with caution.
|
TryGet |
bool |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
The whole point of a key is to identify a state in the first place.
|
TryGet |
bool |
Calls
Animancer.AnimancerGraph.GetKey(UnityEngine.AnimationClip) then passes the key to
Animancer.AnimancerStateDictionary.TryGet(System.Object,Animancer.AnimancerState@) and returns the result.
|
TryGet |
bool |
Passes the
Animancer.IHasKey.Key into Animancer.AnimancerStateDictionary.TryGet(System.Object,Animancer.AnimancerState@)
and returns the result.
|
TryGet |
bool |
If a `state` is registered with the `key`, this method outputs it and returns true. Otherwise the
`state` is set to null and this method returns false.
|