Search Results for

    Class CommonExtensions

    Inheritance
    object
    CommonExtensions
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: SonsSdk
    Assembly: SonsSdk.dll
    Syntax
    public static class CommonExtensions

    Methods

    Destroy<T>(GameObject)

    Declaration
    public static void Destroy<T>(this GameObject go) where T : Component
    Parameters
    Type Name Description
    GameObject go
    Type Parameters
    Name Description
    T

    DontDestroyOnLoad(GameObject)

    Declaration
    public static GameObject DontDestroyOnLoad(this GameObject go)
    Parameters
    Type Name Description
    GameObject go
    Returns
    Type Description
    GameObject

    FindGet<T>(GameObject, string)

    Gets a transform by path and return a component on it

    Declaration
    public static T FindGet<T>(this GameObject go, string name) where T : Component
    Parameters
    Type Name Description
    GameObject go
    string name

    The path of the transform to get

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the component to get

    FirstContains<T>(IEnumerable<T>, string)

    Declaration
    public static T FirstContains<T>(this IEnumerable<T> iter, string name) where T : Object
    Parameters
    Type Name Description
    IEnumerable<T> iter
    string name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FirstEndsWith<T>(IEnumerable<T>, string)

    Declaration
    public static T FirstEndsWith<T>(this IEnumerable<T> iter, string name) where T : Object
    Parameters
    Type Name Description
    IEnumerable<T> iter
    string name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FirstStartsWith<T>(IEnumerable<T>, string)

    Declaration
    public static T FirstStartsWith<T>(this IEnumerable<T> iter, string name) where T : Object
    Parameters
    Type Name Description
    IEnumerable<T> iter
    string name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FirstWithName<T>(IEnumerable<T>, string)

    Declaration
    public static T FirstWithName<T>(this IEnumerable<T> iter, string name) where T : Object
    Parameters
    Type Name Description
    IEnumerable<T> iter
    string name
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    HideAndDontSave(GameObject)

    Declaration
    public static GameObject HideAndDontSave(this GameObject go)
    Parameters
    Type Name Description
    GameObject go
    Returns
    Type Description
    GameObject

    Instantiate(GameObject, bool)

    Declaration
    public static GameObject Instantiate(this GameObject go, bool sameParent = false)
    Parameters
    Type Name Description
    GameObject go
    bool sameParent
    Returns
    Type Description
    GameObject

    Instantiate(GameObject, Vector3, bool)

    Declaration
    public static GameObject Instantiate(this GameObject go, Vector3 position, bool sameParent = false)
    Parameters
    Type Name Description
    GameObject go
    Vector3 position
    bool sameParent
    Returns
    Type Description
    GameObject

    Instantiate(GameObject, Vector3, Quaternion, bool)

    Declaration
    public static GameObject Instantiate(this GameObject go, Vector3 position, Quaternion rotation, bool sameParent = false)
    Parameters
    Type Name Description
    GameObject go
    Vector3 position
    Quaternion rotation
    bool sameParent
    Returns
    Type Description
    GameObject

    InstantiateAndGet<T>(GameObject, bool)

    Declaration
    public static T InstantiateAndGet<T>(this GameObject go, bool sameParent = false) where T : Component
    Parameters
    Type Name Description
    GameObject go
    bool sameParent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndGet<T>(GameObject, Vector3, bool)

    Declaration
    public static T InstantiateAndGet<T>(this GameObject go, Vector3 position, bool sameParent = false) where T : Component
    Parameters
    Type Name Description
    GameObject go
    Vector3 position
    bool sameParent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    InstantiateAndGet<T>(GameObject, Vector3, Quaternion, bool)

    Declaration
    public static T InstantiateAndGet<T>(this GameObject go, Vector3 position, Quaternion rotation, bool sameParent = false) where T : Component
    Parameters
    Type Name Description
    GameObject go
    Vector3 position
    Quaternion rotation
    bool sameParent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    SetName(GameObject, string)

    Declaration
    public static GameObject SetName(this GameObject go, string name)
    Parameters
    Type Name Description
    GameObject go
    string name
    Returns
    Type Description
    GameObject

    SetParent(GameObject, Transform, bool)

    Declaration
    public static GameObject SetParent(this GameObject go, Transform parent, bool worldPositionStays = false)
    Parameters
    Type Name Description
    GameObject go
    Transform parent
    bool worldPositionStays
    Returns
    Type Description
    GameObject

    ToUnityColor(Color)

    Declaration
    public static Color ToUnityColor(this Color color)
    Parameters
    Type Name Description
    Color color
    Returns
    Type Description
    Color

    WithAlpha(Color, float)

    Declaration
    public static Color WithAlpha(this Color color, float alpha)
    Parameters
    Type Name Description
    Color color
    float alpha
    Returns
    Type Description
    Color

    WithBrightness(Color, float)

    Declaration
    public static Color WithBrightness(this Color color, float brightness)
    Parameters
    Type Name Description
    Color color
    float brightness
    Returns
    Type Description
    Color

    WithBrightnessOffset(Color, float)

    Declaration
    public static Color WithBrightnessOffset(this Color color, float brightnessOffset)
    Parameters
    Type Name Description
    Color color
    float brightnessOffset
    Returns
    Type Description
    Color