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)

Remarks

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
ConditionalAttribute

Parameters

Name Type Description
type OptionalWarning

Return Value

Type Description
void