docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TypeInstanceFactory

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

    Methods

    Construct<TValue, TInput>(TInput)

    Constructs an instance of TValue based on the given TInput value.

    Declaration
    public static TValue Construct<TValue, TInput>(TInput source)
    Parameters
    Type Name Description
    TInput source

    The source value containing the data for construction.

    Returns
    Type Description
    TValue

    A new instance of the destination type

    Type Parameters
    Name Description
    TValue

    The destination type to construct.

    TInput

    The source type containing type information.

    IsRegistered<TValue, TInput>()

    Declaration
    public static bool IsRegistered<TValue, TInput>()
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    TValue
    TInput

    Register<TValue>(ITypeConstructor<TValue>)

    Declaration
    public static void Register<TValue>(TypeInstanceFactory.ITypeConstructor<TValue> handler)
    Parameters
    Type Name Description
    TypeInstanceFactory.ITypeConstructor<TValue> handler
    Type Parameters
    Name Description
    TValue

    Register<TInput, TValue>(ITypeConstructor<TInput, TValue>)

    Declaration
    public static void Register<TInput, TValue>(TypeInstanceFactory.ITypeConstructor<TInput, TValue> handler)
    Parameters
    Type Name Description
    TypeInstanceFactory.ITypeConstructor<TInput, TValue> handler
    Type Parameters
    Name Description
    TInput
    TValue

    TryConstruct<TValue, TInput>(TInput, out TValue)

    Declaration
    public static bool TryConstruct<TValue, TInput>(TInput source, out TValue value)
    Parameters
    Type Name Description
    TInput source
    TValue value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    TValue
    TInput
    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)