Summary
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.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Containing Type
- Animancer
State Dictionary
Syntax
public AnimancerState GetOrCreate(Object key, AnimationClip clip, bool allowSetClip = false)
Remarks
See also:
Animancer.AnimancerLayer.GetOrCreateState(System.Object,UnityEngine.AnimationClip,System.Boolean)
Parameters
Name | Type | Description |
---|---|---|
key | Object | |
clip | AnimationClip | |
allowSetClip | bool |
Return Value
Type | Description |
---|---|
AnimancerState |