Hex Terrains Framework
Search Results for

    Show / Hide Table of Contents

    Class Extensions_UnityObject

    Inheritance
    object
    Extensions_UnityObject
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Fwt.Core
    Assembly: fwt.core.dll
    Syntax
    public static class Extensions_UnityObject

    Methods

    GetComponentsInChildrenPreserveOrder<TComponent>(Transform, List<TComponent>)

    Loops through children of given tranform and searches requested Component. Found results is collected into components list. Provided components list is Cleared before usage. If provided components list is null, creates new list. returns null if there is no transform;

    Declaration
    public static List<TComponent> GetComponentsInChildrenPreserveOrder<TComponent>(this Transform transform, List<TComponent> components = null) where TComponent : MonoBehaviour
    Parameters
    Type Name Description
    Transform transform
    List<TComponent> components
    Returns
    Type Description
    List<TComponent>
    Type Parameters
    Name Description
    TComponent

    GetRootCanvas(Transform)

    Returns the root canvas of the whole hierarchy of the given transform.

    Declaration
    public static Canvas GetRootCanvas(this Transform transform)
    Parameters
    Type Name Description
    Transform transform
    Returns
    Type Description
    Canvas

    SmartDestroy(object)

    Declaration
    public static void SmartDestroy(this object instance)
    Parameters
    Type Name Description
    object instance

    SmartDestroy<TObject>(TObject)

    Destroys given object instance or it's GameObject (if it's MonoBehaviour). If Apllication is Playing (Play mode), calls Object.Destroy(); If Application is in Editor (Editor mode), calls Object.DestroyImmediate(); Checks given object to null.

    Declaration
    public static void SmartDestroy<TObject>(this TObject instance) where TObject : Object
    Parameters
    Type Name Description
    TObject instance
    Type Parameters
    Name Description
    TObject

    SmartDisableGameObject<TObject>(TObject)

    Declaration
    public static void SmartDisableGameObject<TObject>(this TObject instance) where TObject : Object
    Parameters
    Type Name Description
    TObject instance
    Type Parameters
    Name Description
    TObject

    SmartEnableGameObject<TObject>(TObject)

    Declaration
    public static void SmartEnableGameObject<TObject>(this TObject instance) where TObject : Object
    Parameters
    Type Name Description
    TObject instance
    Type Parameters
    Name Description
    TObject

    SmartGetComponent<TComponent>(object)

    If instance is TComponent, returns it as TComponent; If instance is GameObject or MonoBehaviour, calls GetComponentTComponent() at that GameObject

    Declaration
    public static TComponent SmartGetComponent<TComponent>(this object instance)
    Parameters
    Type Name Description
    object instance
    Returns
    Type Description
    TComponent
    Type Parameters
    Name Description
    TComponent

    SmartGetGameGameObject(object)

    if instance is GameObject, returns it as GameObject; if instance is MonoBehaviour, returns it's GameObject

    Declaration
    public static GameObject SmartGetGameGameObject(this object instance)
    Parameters
    Type Name Description
    object instance
    Returns
    Type Description
    GameObject
    In this article
    Back to top Generated by DocFX