Summary
An
Animancer.IUpdatable
that cancels any fades and logs warnings when they occur.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
- Base Types
-
- Object
- Updatable
graph BT
Type-->Base0["Updatable"]
click Base0 "/animancer/api/Animancer/Updatable"
Base0-->Base1["Object"]
Type-.->Interface0["IUpdatable"]
click Interface0 "/animancer/api/Animancer/IUpdatable"
Type["DontAllowFade"]
class Type type-node
Syntax
public class DontAllowFade : Updatable, IUpdatable
Remarks
This is useful for
UnityEngine.Sprite
based characters since fading does nothing for them.
You can also set the Animancer.AnimancerGraph.DefaultFadeDuration
to 0 so that you don't need to set it
manually on all your transitions.
Example:
[SerializeField] private AnimancerComponent _Animancer;
protected virtual void Awake()
{
// To only apply it only in the Unity Editor and Development Builds:
DontAllowFade.Assert(_Animancer);
// Or to apply it at all times:
_Animancer.Graph.RequireUpdate(new DontAllowFade());
}
Methods
Name | Value | Summary |
---|---|---|
Assert |
void |
[Assert-Conditional] Applies a
Animancer.DontAllowFade to `animancer`.static
|
Update |
void |
Calls
Animancer.DontAllowFade.Validate(Animancer.AnimancerNode) on all layers and their Animancer.AnimancerLayer.CurrentState . |