Summary
Calls
Animancer.AnimancerGraph.GetKey(UnityEngine.AnimationClip) and returns the state registered with that key
or creates one if it doesn't exist.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Containing Type
- Animancer
State Dictionary
Syntax
public AnimancerState GetOrCreate(AnimationClip clip, bool allowSetClip = false)
Remarks
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.
Parameters
| Name | Type | Description |
|---|---|---|
| clip | AnimationClip | |
| allowSetClip | bool |
Return Value
| Type | Description |
|---|---|
| AnimancerState |