TransitionLibrary Class

Summary

[Pro-Only] A library of Animancer.ITransitions which allows specific transition combinations to be overridden without needing to be hard coded.
Assembly
Animancer.dll
Namespace
Animancer.TransitionLibraries
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IAnimationClipSource"] Type-.->Interface1["ICopyable<TransitionLibrary>"] Type["TransitionLibrary"] class Type type-node

Syntax

public class TransitionLibrary : IAnimationClipSource, ICopyable<TransitionLibrary>

Remarks

Documentation: Transition Libraries

Properties

Name Value Summary
AliasCount int
[Pro-Only] The number of transitions in this library plus any additional aliases.
Count int
[Pro-Only] The number of transitions in this library.

Methods

Name Value Summary
AddAlias(Object, ITransition) TransitionModifierGroup
[Pro-Only] Registers the `transition` with the `key`.
AddAlias(Object, TransitionModifierGroup) void
[Pro-Only] Registers the `group` with another `key`.
AddLibrary(TransitionLibrary) void
[Pro-Only] Adds the contents of `copyFrom` into this library.
AddLibrary(TransitionLibrary, CloneContext) void
[Pro-Only] Adds the contents of `copyFrom` into this library.
AddTransition(IHasKey, ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library.
AddTransition(ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library.
AddTransition(Object, ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library.
Clear() void
[Pro-Only] Removes everything from this library, leaving it empty.
ContainsKey(IHasKey) bool
[Pro-Only] Does this library contain a transition registered with the Animancer.IHasKey.Key?
ContainsKey(Object) bool
[Pro-Only] Does this library contain a transition registered with the `key`?
CopyFrom(TransitionLibrary, CloneContext) void
Copies the contents of `copyFrom` into this object, replacing its previous contents.
GetAnimationClips(List<AnimationClip>) void
[Pro-Only] Gathers all the animations in this library.
GetFadeDuration(AnimancerLayer, ITransition) float
[Pro-Only] Returns the fade duration to use when transitioning from the Animancer.AnimancerLayer.CurrentState to the `transition`.
GetFadeDuration(AnimancerLayer, Object, float) float
[Pro-Only] Returns the fade duration to use when transitioning from the Animancer.AnimancerLayer.CurrentState to the `key`.
GetFadeDuration(IHasKey, ITransition) float
[Pro-Only] Returns the fade duration to use when transitioning from `from` to the `transition`.
GetFadeDuration(Object, ITransition) float
[Pro-Only] Returns the fade duration to use when transitioning from `from` to the `transition`.
IndexOf(IHasKey) int
[Pro-Only] Finds the Animancer.TransitionLibraries.TransitionModifierGroup.Index of the group registered with the `key` or returns -1.
IndexOf(Object) int
[Pro-Only] Finds the Animancer.TransitionLibraries.TransitionModifierGroup.Index of the group registered with the `key` or returns -1.
Initialize(TransitionLibraryDefinition) void
[Pro-Only] Adds the contents of the `definition` to this library.
Play(AnimancerLayer, ITransition) AnimancerState
Calls Animancer.AnimancerLayer.Play(Animancer.ITransition,System.Single,Animancer.FadeMode) with the fade duration potentially modified by this library.
Play(AnimancerLayer, TransitionModifierGroup) AnimancerState
Calls Animancer.AnimancerLayer.Play(Animancer.ITransition,System.Single,Animancer.FadeMode) with the fade duration potentially modified by this library.
RemoveFadeDuration(IHasKey, IHasKey) bool
[Pro-Only] Removes a modified fade duration for transitioning from `from` to `to`.
RemoveFadeDuration(Object, Object) bool
[Pro-Only] Removes a modified fade duration for transitioning from `from` to `to`.
RemoveTransition(IHasKey) bool
[Pro-Only] Removes the transition registered with the Animancer.IHasKey.Key.
RemoveTransition(Object) bool
[Pro-Only] Removes the transition registered with the `key`.
SetFadeDuration(IHasKey, ITransition, float) void
[Pro-Only] Sets the Animancer.ITransition.FadeDuration to use when transitioning from `from` to `to`.
SetFadeDuration(Object, ITransition, float) void
[Pro-Only] Sets the Animancer.ITransition.FadeDuration to use when transitioning from `from` to `to`.
SetFadeDuration(TransitionModifierDefinition) bool
[Pro-Only] Sets the Animancer.ITransition.FadeDuration to use when transitioning from Animancer.TransitionLibraries.TransitionModifierDefinition.FromIndex to Animancer.TransitionLibraries.TransitionModifierDefinition.ToIndex.
SetTransition(IHasKey, ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library or replaces the existing one registered with the `key`.
SetTransition(ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library or replaces the existing one registered with the `key`.
SetTransition(Object, ITransition) TransitionModifierGroup
[Pro-Only] Adds the `transition` to this library or replaces the existing one registered with the `key`.
TryGetTransition(IHasKey, TransitionModifierGroup) bool
[Pro-Only] Tries to find a Animancer.TransitionLibraries.TransitionModifierGroup registered with the Animancer.IHasKey.Key.
TryGetTransition(int, TransitionModifierGroup) bool
[Pro-Only] Tries to find a Animancer.TransitionLibraries.TransitionModifierGroup via its Animancer.TransitionLibraries.TransitionModifierGroup.Index.
TryGetTransition(Object, TransitionModifierGroup) bool
[Pro-Only] Tries to find a Animancer.TransitionLibraries.TransitionModifierGroup registered with the `key`.
TryPlay(AnimancerLayer, Object) AnimancerState
Plays the transition registered with the specified `key` if there is one. Otherwise, returns null.