Table of Contents

Class GLMonoBehaviour

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Provides some additional functions for MonoBehaviour.

[Version(1, 0, 0)]
[AddComponentMenu("Gamelogic/Extensions/GLMonoBehaviour")]
public class GLMonoBehaviour : MonoBehaviour
Inheritance
GLMonoBehaviour
Derived
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.runInEditMode
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponents<T>()
Component.gameObject
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DestroyObject(Object)
Object.ToString()
Object.hideFlags
Extension Methods

Methods

DestroyUniversal(Object)

Destroys given object using either Object.Destroy, or Object.DestroyImmediate, depending on whether Application.isPlaying is true or not. This is useful when writing methods that is used by both editor tools and the game itself.

FindObjectsOfInterface<TInterface>()

Similar to FindObjectsOfType, except that it looks for components that implement a specific interface.

FindRequiredObjectOfType<T>()

Finds a component of the given type in the scene, or fail if no such component can be found.

GetRequiredComponentInChildren<T>()

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>()

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

Instantiate(GameObject)

Instantiates a prefab.

Instantiate(GameObject, GameObject)

Instantiates a prefab and parents it to the root.

Instantiate(GameObject, GameObject, Vector3, Quaternion)

Instantiates a prefab, attaches it to the given root, and sets the local position and rotation.

Instantiate(GameObject, Vector3, Quaternion)

Instantiates the specified prefab.

Instantiate<T>(T)

Instantiates the specified prefab.

Instantiate<T>(T, GameObject)

Instantiates a prefab and attaches it to the given root.

Instantiate<T>(T, GameObject, Vector3, Quaternion)

Instantiates a prefab, attaches it to the given root, and sets the local position and rotation.

Instantiate<T>(T, Vector3, Quaternion)

Instantiates an object at the given position in the given orientation.

Invoke(Action, float)
InvokeRepeating(Action, IGenerator<float>)
InvokeRepeating(Action, float, float)
Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>)
Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>, Func<float>)