Class GLMonoBehaviour
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Provides some additional functions for MonoBehaviour.
[Version(1, 0, 0)]
[AddComponentMenu("Gamelogic/ExtensionsGLMonoBehaviour")]
public class GLMonoBehaviour : MonoBehaviour
- Inheritance
-
GLMonoBehaviour
- Derived
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.runInEditModeComponent.GetComponent<T>()Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentsInParent<T>()Component.transformComponent.gameObjectComponent.tagObject.Instantiate(Object, Vector3, Quaternion)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.FindObjectsOfType<T>()Object.nameObject.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 at the given position and rotation.
- 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)
Invokes the given action after the specified delay.
- InvokeRepeating(Action, IGenerator<float>)
Invokes the given action repeatedly, with intervals generated by the given generator.
- InvokeRepeating(Action, float, float)
Invokes the given action after a delay, then repeats it at the given interval.
- Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>)
Tweens a value from
starttofinishovertotalTimeseconds.
- Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>, Func<float>)
Tweens a value from
starttofinishovertotalTimeseconds.