Table of Contents

Class MonoBehaviourExtensions

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Provides useful extension methods for MonoBehaviours.

[Version(1, 0, 0)]
public static class MonoBehaviourExtensions
Inheritance
MonoBehaviourExtensions
Inherited Members

Methods

CancelInvoke(MonoBehaviour, Action)

Cancels the action if it was scheduled.

Clone<T>(T)

Clones an object.

Clone<T>(T, int)

Clones an object.

FindChild(Component, string)
FindChild(Component, string, bool)
GetComponentInChildrenAlways<T>(Component)

Finds a component of the type T in on the same object, or on a child down the hierarchy. This method also works in the editor and when the game object is inactive.

GetComponentsInChildrenAlways<T>(Component)

Finds all components of the type T on the same object and on a children down the hierarchy. This method also works in the editor and when the game object is inactive.

GetInterfaceComponent<TInterface>(Component)

Gets an attached component that implements the interface of the type parameter.

GetRequiredComponentInChildren<T>(Component)

Gets a component of the given type in one of the children, or fail if no such component is attached to the given component.

GetRequiredComponent<T>(Component)

Gets a component of the given type, or fail if no such component is attached to the given component.

Invoke(MonoBehaviour, Action, float)

Invokes the given action after the given amount of time.

InvokeRepeating(MonoBehaviour, Action, IGenerator<float>)

Invokes the given action after the given amount of time, and repeats the action after every repeatTime seconds.

InvokeRepeating(MonoBehaviour, Action, float, float)

Invokes the given action after the given amount of time, and repeats the action after every repeatTime seconds.

IsInvoking(MonoBehaviour, Action)

Returns whether an invoke is pending on an action.

Tween<T>(MonoBehaviour, T, T, float, Func<T, T, float, T>, Action<T>)
Tween<T>(MonoBehaviour, T, T, float, Func<T, T, float, T>, Action<T>, Func<float>)