Summary
A dictionary of
Animancer.AnimancerState
s mapped to their Animancer.AnimancerState.Key
.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IEnumerable
<AnimancerState> - I
Animation Clip Collection
- IEnumerable
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IEnumerable<AnimancerState>"]
Type-.->Interface1["IAnimationClipCollection"]
click Interface1 "/animancer-v7-4/api/Animancer/IAnimationClipCollection"
Type["AnimancerPlayable.StateDictionary"]
class Type type-node
Syntax
public class AnimancerPlayable.StateDictionary : IEnumerable<AnimancerState>,
IAnimationClipCollection
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.
|
EqualityComparer | IEqualityComparer |
The
System.Collections.Generic.IEqualityComparer`1 used by every new Animancer.AnimancerPlayable.StateDictionary .static
|
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.AnimancerPlayable.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 |
---|---|---|
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.AnimancerPlayable.StateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.GetOrCreate(UnityEngine.AnimationClip,System.Boolean) for each of the specified clips. |
CreateIfNew |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.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.AnimancerPlayable.StateDictionary.Destroy(UnityEngine.AnimationClip) on all states gathered by
Animancer.IAnimationClipCollection.GatherAnimationClips(System.Collections.Generic.ICollection{UnityEngine.AnimationClip}) .
|
DestroyAll |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.Destroy(UnityEngine.AnimationClip) on all states gathered by
UnityEngine.IAnimationClipSource.GetAnimationClips(System.Collections.Generic.List{UnityEngine.AnimationClip}) .
|
DestroyAll |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.Destroy(UnityEngine.AnimationClip) on each of the `clips`. |
DestroyAll |
void |
Calls
Animancer.AnimancerPlayable.StateDictionary.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.AnimancerPlayable.GetKey(UnityEngine.AnimationClip) and returns the state which registered with that 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.
|
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 to 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.AnimancerPlayable.GetKey(UnityEngine.AnimationClip) then passes the key to
Animancer.AnimancerPlayable.StateDictionary.TryGet(System.Object,Animancer.AnimancerState@) and returns the result.
|
TryGet |
bool |
Passes the
Animancer.IHasKey.Key into Animancer.AnimancerPlayable.StateDictionary.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.
|