docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TypeConstructionUtility

    Utility class around Type.

    Inheritance
    object
    TypeConstructionUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Properties.UI
    Assembly: Unity.Properties.UI.Editor.dll
    Syntax
    public static class TypeConstructionUtility

    Methods

    CanBeConstructedFromDerivedType<T>()

    Returns true if type T is constructable from any of its derived types.

    Declaration
    public static bool CanBeConstructedFromDerivedType<T>()
    Returns
    Type Description
    bool

    true if type T is constructable from any of its derived types.

    Type Parameters
    Name Description
    T

    The type to query.

    Remarks

    Constructable is defined as either having a default or implicit constructor or having a registered construction method.

    GetAllConstructableTypes(Type)

    Returns a list of all the constructable types from the provided type.

    Declaration
    public static IEnumerable<Type> GetAllConstructableTypes(Type type)
    Parameters
    Type Name Description
    Type type

    The type to query.

    Returns
    Type Description
    IEnumerable<Type>

    A list of all the constructable types from the provided type.

    GetAllConstructableTypes(Type, List<Type>)

    Adds all the constructable types from the provided type to the given list.

    Declaration
    public static void GetAllConstructableTypes(Type type, List<Type> result)
    Parameters
    Type Name Description
    Type type

    The type to query.

    List<Type> result

    List to contain the results.

    GetAllConstructableTypes<TType>()

    Returns a list of all the constructable types from the TType type.

    Declaration
    public static IEnumerable<Type> GetAllConstructableTypes<TType>()
    Returns
    Type Description
    IEnumerable<Type>

    A list of all the constructable types from the TType type.

    Type Parameters
    Name Description
    TType

    The type to query.

    GetAllConstructableTypes<TType>(List<Type>)

    Adds all the constructable types from the TType type to the given list.

    Declaration
    public static void GetAllConstructableTypes<TType>(List<Type> result)
    Parameters
    Type Name Description
    List<Type> result

    List to contain the results.

    Type Parameters
    Name Description
    TType

    The type to query.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)