Validate.

Disable(OptionalWarning) Method

Summary

[Animancer Extension] [Assert-Conditional] Disables the specified warning type. Supports bitwise combinations.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
Validate

Syntax

[System.Diagnostics.Conditional(Strings.Assertions)]
public static void Disable(this OptionalWarning type)

Examples

You can put the following method 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.EndEventInterrupt.Disable();
    
    // You could disable OptionalWarning.All, but that is not recommended for obvious reasons.
}
#endif

Attributes

Type Description
ConditionalAttribute

Parameters

Name Type Description
type OptionalWarning

Return Value

Type Description
void