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
Fields
| Name | Constant Value | Summary |
|---|---|---|
| ExpectedWarnings |
[Internal] [Assert-Only]
Warnings that are expected to be logged.
If triggered, they will instead be removed from this set.
static
|
Properties
| Name | Value | Summary |
|---|---|---|
| Permanently |
OptionalWarning |
[Assert-Only] Warnings that are automatically disabled
static
|
| WarningsAsErrors | int |
[Internal] [Assert-Only]
If positive, unexpected warnings will throw exceptions instead of being logged.
static
|
Methods
| Name | Value | Summary |
|---|---|---|
| AssertAnimationClip |
void |
[Assert-Conditional]
Throws if the `clip` is
null, not an asset, or marked as UnityEngine.AnimationClip.legacy.
static
|
| AssertCanRemoveChild |
void |
[Assert-Conditional]
Throws if the `state` was not actually assigned to its specified
Animancer.AnimancerNode.Index in
the `states`.
static
|
| Assert |
void |
[Internal] [Assert-Only]
Asserts that all
Animancer.Validate.ExpectedWarnings have been triggered.
static
|
| AssertGraph |
void |
[Assert-Conditional] Throws if the
Animancer.AnimancerNodeBase.Graph is not the `graph`.static
|
| AssertPlayable |
void |
[Assert-Conditional] Throws if the `node`'s
UnityEngine.Playables.Playable is invalid.static
|
| AssertSetWeight |
void |
[Assert-Conditional] Throws if the `weight` is negative, infinity, or NaN.
static
|
| Disable |
void |
[Animancer Extension] [Assert-Conditional]
Disables the specified warning type. Supports bitwise combinations.
static
|
| DisableTemporarily |
OptionalWarning |
[Animancer Extension] [Assert-Only]
Disables the specified warnings and returns those that were previously enabled.
static
|
| Enable |
void |
[Animancer Extension] [Assert-Conditional]
Enables the specified warning type. Supports bitwise combinations.
static
|
| IsDisabled |
bool |
[Animancer Extension] [Assert-Only] Are all of the specified warning types disabled?
static
|
| IsEnabled |
bool |
[Animancer Extension] [Assert-Only] Are none of the specified warning types disabled?
static
|
| Log |
void |
[Animancer Extension] [Assert-Conditional]
Logs the `message` as a warning if the `type` is enabled.
static
|
| SetEnabled |
void |
[Animancer Extension] [Assert-Conditional]
Enables or disables the specified warning type. Supports bitwise combinations.
static
|
| ValueRule |
void |
Enforces the `rule` on the `value`.
static
|