AnimancerEditorUtilities Class

Summary

[Editor-Only] Various utilities used throughout Animancer.
Assembly
Animancer.dll
Namespace
Animancer.Editor
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["AnimancerEditorUtilities"] class Type type-node

Syntax

public static class AnimancerEditorUtilities

Properties

Name Value Summary
IsChangingPlayMode bool
Is the Unity Editor is currently changing between Play Mode and Edit Mode?
static
PlayModeState PlayModeStateChange
The most recent UnityEditor.PlayModeStateChange.
static

Methods

Name Value Summary
AddDocumentationLink(GenericMenu, string, string) void
Adds a menu function to open a web page. If the `linkSuffix` starts with a '/' then it will be relative to the Animancer.Strings.DocsURLs.Documentation.
static
AddFadeFunction(GenericMenu, string, bool, AnimancerNode, Action<float>) void
Adds a menu function which passes the result of Animancer.Editor.AnimancerEditorUtilities.CalculateEditorFadeDuration(Animancer.AnimancerNode,System.Single) into `startFade`.
static
CalculateBounds(Transform) Bounds
Calculates the overall bounds of all renderers under the `transform`.
static
CalculateEditorFadeDuration(AnimancerNode, float) float
[Animancer Extension] [Editor-Only] Returns the duration of the `node`s current fade (if any), otherwise returns the `defaultDuration`.
static
DeleteSubAsset(Object) void
Deletes the specified `subAsset`.
static
FindAssetOfType<T>() T
Finds an asset of the specified type anywhere in the project.
static
FindOrCreate<T>(T, HideFlags) T
Finds or creates an instance of T.
static
IndexOfType<T>(IList<T>, Type) int
Finds the index of the first item with the specified `type`.
static
InstantiateDerivedTypes<T>(List<T>) void
Removes any null items and ensures that it contains an instance of each type derived from T.
static
InverseLerpUnclampedX(Rect, float) float
Returns the value of `t` inverse linearly interpolated along the X axis of the `rect`.
static
IsNaN(Vector2) bool
[Animancer Extension] [Editor-Only] Is the UnityEngine.Vector2.x or UnityEngine.Vector2.y NaN?
static
IsNaN(Vector3) bool
[Animancer Extension] [Editor-Only] Is the UnityEngine.Vector3.x, UnityEngine.Vector3.y, or UnityEngine.Vector3.z NaN?
static
LerpUnclampedX(Rect, float) float
Returns the value of `t` linearly interpolated along the X axis of the `rect`.
static
RemoveMissingAndDuplicates(List<GameObject>) bool
Removes any items from the `list` that are null and items that appear multiple times. Returns true if the `list` was modified.
static
SetCount<T>(List<T>, int) void
Adds default items or removes items to make the System.Collections.Generic.List`1.Count equal to the `count`.
static
SetLooping(AnimationClip, bool) void
Sets the UnityEngine.Motion.isLooping flag.
static