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
Fields
| Name | Constant Value | Summary |
|---|---|---|
| AnyAccessBindings | 60 |
Commonly used
System.Reflection.BindingFlags combinations.static
|
| InstanceBindings | 52 |
Commonly used
System.Reflection.BindingFlags combinations.static
|
| StaticBindings | 56 |
Commonly used
System.Reflection.BindingFlags combinations.static
|
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 |
|---|---|---|
| AddContextMenuIK |
void |
Adds functions to show and set
Animancer.IPlayableWrapper.ApplyAnimatorIK and
Animancer.IPlayableWrapper.ApplyFootIK.
static
|
| AddDocumentationLink |
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 |
void |
Adds a menu function which passes the result of
Animancer.Editor.AnimancerEditorUtilities.CalculateEditorFadeDuration(Animancer.AnimancerNode,System.Single) into `startFade`.
static
|
| Append |
int |
Appends the generic arguments of `type` (after skipping the specified number).
static
|
| Calculate |
float |
[Animancer Extension] [Editor-Only]
Returns the duration of the `node`s current fade (if any), otherwise returns the `defaultDuration`.
static
|
| FindAssetOfType |
T |
Finds an asset of the specified type anywhere in the project.
static
|
| FindRoot |
Transform |
Takes a `gameObject` and returns the root
UnityEngine.Transform of the character it is part of.static
|
| FindRoot |
Transform |
Calls
Animancer.Editor.AnimancerEditorUtilities.FindRoot(UnityEngine.GameObject) if the specified `obj` is a UnityEngine.GameObject or
UnityEngine.Component.
static
|
| GetAttribute |
TAttribute |
[Animancer Extension] [Editor-Only]
Returns the first TAttribute attribute on the `member` or
null if there is none.
static
|
| GetNameCS |
string |
Returns the name of a `type` as it would appear in C# code.
static
|
| Initialize |
bool |
Creates a new dictionary and returns true if it was null or calls
Animancer.Editor.AnimancerEditorUtilities.RemoveDestroyedObjects``2(System.Collections.Generic.Dictionary{``0,``1}) and
returns false if it wasn't.
static
|
| IsNaN |
bool |
[Animancer Extension] [Editor-Only] Is the
UnityEngine.Vector2.x or UnityEngine.Vector2.y NaN?static
|
| IsNaN |
bool |
[Animancer Extension] [Editor-Only] Is the
UnityEngine.Vector3.x, UnityEngine.Vector3.y, or UnityEngine.Vector3.z NaN?static
|
| Normalize |
void |
Re-scales the
Animancer.AnimancerNode.Weight of all children to add up to 1.static
|
| Remove |
void |
Removes any items from the `dictionary` that use destroyed objects as their key.
static
|
| Remove |
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 |
void |
Adds default items or removes items to make the
System.Collections.Generic.List`1.Count equal to the `count`.static
|
| SetLooping |
void |
Sets the
UnityEngine.Motion.isLooping flag.static
|
| ToStringCached |
string |
[Animancer Extension]
Calls
System.Single.ToString(System.String) using "g" as the format and caches the result.
static
|
| TryGetGameObject |
bool |
Outputs the
UnityEngine.GameObject assignated with the `obj` and returns true if it exists.static
|