Summary
Bitwise flags used to determine which warnings Animancer should give.
These warnings are all optional.
Feel free to disable any of them if you understand the potential issues they're referring to.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Base Types
-
- Enum
graph BT
Type-->Base0["Enum"]
Type["OptionalWarning"]
class Type type-node
Syntax
[Flags]
public enum OptionalWarning
Remarks
All warnings are enabled by default, but are compiled out of runtime builds (except development builds).
You can manually disable warnings using the
AnimancerSettings
asset
or the Animancer Settings panel in the Animancer Tools Window (Window/Animation/Animancer Tools
).
Example:
You can put a method like this in any class to disable whatever warnings you don't want on startup:
#if UNITY_ASSERTIONS
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void DisableAnimancerWarnings()
{
Animancer.OptionalWarning.ProOnly.Disable();
// You could disable OptionalWarning.All, but that's not recommended for obvious reasons.
}
#endif
Attributes
Type | Description |
---|---|
FlagsAttribute |
Fields
Name | Constant Value | Summary |
---|---|---|
All | -1 |
All warning types.
static
|
AnimatorDisabled | 4 |
The
Animancer.AnimancerComponent.Animator is disabled so Animancer won't be able to play animations.
static
|
AnimatorSpeed | 16384 |
The
UnityEngine.Animator.speed property does not affect Animancer.
Use AnimancerGraph.Speed instead.
static
|
CloneComplexState | 131072 |
Animancer.AnimancerLayer.GetOrCreateWeightlessState(Animancer.AnimancerState) is cloning a complex state such as a
Animancer.ManualMixerState or Animancer.ControllerState .
This has a larger performance cost than cloning a Animancer.ClipState and these states
generally have parameters that need to be controlled which may result in undesired behaviour
if your scripts are only expecting to have one state to control.
static
|
Create |
2 |
An
Animancer.AnimancerComponent.Graph is being initialized
during a type of GUI event that isn't supposed to cause side effects.
static
|
DynamicAnimation | 262144 |
Unity doesn't suppport dynamically creating animations for Animancer in runtime builds
so this warning is given when attempting to use an animation which isn't saved as an
asset to explain this limitation as early as possible.
static
|
EndEventInterrupt | 32 |
An End Event
didn't actually end the animation.
static
|
EventPlayMismatch | 64 |
An Animancer Event
triggered by one character was used to play an animation on a different character.
static
|
ExpectFade | 4096 |
When a transition with a non-zero
Animancer.ITransition.FadeDuration
creates a state, that state will log this warning if it's ever played
without a fade duration.
static
|
FadeEasingBounds | 8192 |
A Custom Easing
is being started but its weight calculation does not go from 0 to 1.
static
|
MixerMinChildren | 1024 |
A Mixer State is being initialized with its
AnimancerNode.ChildCount <= 1.
static
|
Mixer |
2048 |
A Mixer State is synchronizing a child with
Animancer.AnimancerState.Length = 0.
static
|
Native |
8 |
An
UnityEngine.Animator.runtimeAnimatorController is assigned
but the Rig is Humanoid so it can't be blended with Animancer.
static
|
Native |
16 |
An
UnityEngine.Animator.runtimeAnimatorController is assigned while also using a
Animancer.HybridAnimancerComponent .
static
|
None | 0 |
default static
|
Playable |
65536 |
Animancer.PlayableAssetState.InitializeBindings is trying to bind to the same UnityEngine.Animator
that is being used by Animancer.
static
|
ProOnly | 1 |
A Pro-Only Feature
has been used in Animancer Lite.
static
|
StringReference | 524288 |
Animancer.StringReference s are generally more efficient for comparisons
than raw string s and are not interchangeable so references should be preferred.
static
|
UnsupportedEvents | 256 |
Animancer Events
are being used on a state which does not properly support them so they might not work as intended.
static
|
UnsupportedIK | 512 |
Inverse Kinematics
cannot be dynamically enabled on some
State types.
static
|
UnusedNode | 32768 |
An
Animancer.AnimancerNodeBase.Graph is null during finalization (garbage collection).
static
|
UselessEvent | 128 |
An
Animancer.AnimancerEvent that does nothing was invoked.
Most likely it was not configured correctly.
static
|
Extension Methods
Name | Value | Summary |
---|---|---|
Disable |
void |
[Animancer Extension] [Assert-Conditional]
Disables the specified warning type. Supports bitwise combinations.
From Validate
|
DisableTemporarily |
OptionalWarning |
[Animancer Extension] [Assert-Only]
Disables the specified warnings and returns those that were previously enabled.
From Validate
|
Enable |
void |
[Animancer Extension] [Assert-Conditional]
Enables the specified warning type. Supports bitwise combinations.
From Validate
|
IsDisabled |
bool |
[Animancer Extension] [Assert-Only] Are all of the specified warning types disabled?
From Validate
|
IsEnabled |
bool |
[Animancer Extension] [Assert-Only] Are none of the specified warning types disabled?
From Validate
|
Log |
void |
[Animancer Extension] [Assert-Conditional]
Logs the `message` as a warning if the `type` is enabled.
From Validate
|
SetEnabled |
void |
[Animancer Extension] [Assert-Conditional]
Enables or disables the specified warning type. Supports bitwise combinations.
From Validate
|