Validate Class

Summary

Enforces various rules throughout the system, most of which are compiled out if UNITY_ASSERTIONS is not defined (by default, it is only defined in the Unity Editor and in Development Builds).
Assembly
Animancer.dll
Namespace
Animancer
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["Validate"] class Type type-node

Syntax

public static class Validate

Properties

Name Value Summary
PermanentlyDisabledWarnings OptionalWarning
[Assert-Only] Warnings that are automatically disabled and stored in UnityEngine.PlayerPrefs.
static

Methods

Name Value Summary
AssertCanRemoveChild(AnimancerState, IList<AnimancerState>, int) void
[Assert-Conditional] Throws if the `state` was not actually assigned to its specified Animancer.AnimancerNode.Index in the `states`.
static
AssertNotLegacy(AnimationClip) void
[Assert-Conditional] Throws if the `clip` is marked as UnityEngine.AnimationClip.legacy.
static
AssertPlayable(AnimancerNode) void
[Assert-Conditional] Throws if the `node`'s UnityEngine.Playables.Playable is invalid.
static
AssertRoot(AnimancerNode, AnimancerPlayable) void
[Assert-Conditional] Throws if the Animancer.AnimancerNode.Root is not the `root`.
static
Disable(OptionalWarning) void
[Animancer Extension] [Assert-Conditional] Disables the specified warning type. Supports bitwise combinations.
static
DisableTemporarily(OptionalWarning) OptionalWarning
[Animancer Extension] [Assert-Only] Disables the specified warnings and returns those that were previously enabled.
static
Enable(OptionalWarning) void
[Animancer Extension] [Assert-Conditional] Enables the specified warning type. Supports bitwise combinations.
static
IsDisabled(OptionalWarning) bool
[Animancer Extension] [Assert-Only] Are all of the specified warning types disabled?
static
IsEnabled(OptionalWarning) bool
[Animancer Extension] [Assert-Only] Are none of the specified warning types disabled?
static
Log(OptionalWarning, string, Object) void
[Animancer Extension] [Assert-Conditional] Logs the `message` as a warning if the `type` is enabled.
static
SetEnabled(OptionalWarning, bool) void
[Animancer Extension] [Assert-Conditional] Enables or disables the specified warning type. Supports bitwise combinations.
static
ValueRule(float, Validate.Value) void
Enforces the `rule` on the `value`.
static