Summary
An
Animancer.IUpdatable
that cancels any fades and logs warnings when they occur.- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
- Base Types
-
- Object
- Key
graph BT
Type-->Base0["Key"]
click Base0 "/animancer-v7-4/api/Animancer/Key"
Base0-->Base1["Object"]
Type-.->Interface0["IUpdatable"]
click Interface0 "/animancer-v7-4/api/Animancer/IUpdatable"
Type-.->Interface1["Key.IListItem"]
click Interface1 "/animancer-v7-4/api/Animancer/IListItem"
Type["DontAllowFade"]
class Type type-node
Syntax
public class DontAllowFade : Key, IUpdatable, Key.IListItem
Examples
[SerializeField] private AnimancerComponent _Animancer;
private 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.Playable.RequireUpdate(new DontAllowFade());
}
Remarks
This is useful for
UnityEngine.Sprite
based characters since fading does nothing for them.
You can also set the Animancer.AnimancerPlayable.DefaultFadeDuration
to 0 so that you don't need to set it
manually on all your transitions.
Fields
Methods
Name | Value | Summary |
---|---|---|
Assert |
void |
[Assert-Conditional] Applies a
Animancer.DontAllowFade to `animancer`.static
|
IndexOf |
int |
Returns location of this object in the list (or
-1 if it is not currently in a keyed list).Inherited from Key
static
|
IsInList |
bool |
Is the `key` currently in a keyed list?
Inherited from Key
static
|