Table of Contents

Class RuntimeUtil

Namespace
nadena.dev.ndmf.runtime

A collection of general-purpose utilities that are available from Runtime-scope scripts.

public static class RuntimeUtil
Inheritance
RuntimeUtil
Inherited Members

Properties

DelayCall

Invoke this function to register a callback with EditorApplication.delayCall from a context that cannot access EditorApplication.

public static Action<Action> DelayCall { get; }

Property Value

Action<Action>

IsPlaying

Returns whether the editor is in play mode.

public static bool IsPlaying { get; }

Property Value

bool

Methods

AvatarRootPath(GameObject)

Returns the path of a game object relative to the avatar root, or null if the avatar root could not be located.

public static string AvatarRootPath(GameObject child)

Parameters

child GameObject

Returns

string

FindAvatarInParents(Transform)

Returns the component marking the root of the avatar.

public static Transform FindAvatarInParents(Transform target)

Parameters

target Transform

Returns

Transform

FindAvatarRoots(GameObject)

Return a list of avatar roots in the current Scene(s). This function is a heuristic, and the details of its operation may change in patch releases.

public static IEnumerable<GameObject> FindAvatarRoots(GameObject root = null)

Parameters

root GameObject

Returns

IEnumerable<GameObject>

IsAvatarRoot(Transform)

Check whether the target component is the root of the avatar.

public static bool IsAvatarRoot(Transform target)

Parameters

target Transform

Returns

bool

RelativePath(GameObject, GameObject)

Returns the relative path from root to child, or null is child is not a descendant of root.

public static string RelativePath(GameObject root, GameObject child)

Parameters

root GameObject
child GameObject

Returns

string