AnimancerNode.

Weight Property

Summary

The current blend weight of this node which determines how much it affects the final output.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerNode

Syntax

public float Weight { get; set; }

Examples

Calling Animancer.AnimancerPlayable.Play(UnityEngine.AnimationClip) immediately sets the weight of all states to 0 and the new state to 1. Note that this is separate from other values like Animancer.AnimancerState.IsPlaying so a state can be paused at any point and still show its pose on the character or it could be still playing at 0 weight if you want it to still trigger events (though states are normally stopped when they reach 0 weight so you would need to explicitly set it to playing again).

Calling Animancer.AnimancerPlayable.Play(UnityEngine.AnimationClip,System.Single,Animancer.FadeMode) does not immediately change the weights, but instead calls Animancer.AnimancerNode.StartFade(System.Single,System.Single) on every state to set their Animancer.AnimancerNode.TargetWeight and Animancer.AnimancerNode.FadeSpeed. Then every update each state's weight will move towards that target value at that speed.

Remarks

0 has no effect while 1 applies the full effect and values inbetween apply a proportional effect.

Setting this property cancels any fade currently in progress. If you don't wish to do that, you can use Animancer.AnimancerNode.SetWeight(System.Single) instead.

Animancer Lite only allows this value to be set to 0 or 1 in runtime builds.

Value

Type Description
float