AnimancerPlayable.StateDictionary.

AnimancerPlayable.

GetOrCreate(AnimationClip, bool) Method

Summary

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.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerPlayable.StateDictionary

Syntax

public AnimancerState GetOrCreate(AnimationClip clip, bool allowSetClip = false)

Parameters

Name Type Description
clip AnimationClip
allowSetClip bool

Return Value

Type Description
AnimancerState