docs.unity.cn
    Show / Hide Table of Contents

    Class TypeBinder

    Inheritance
    Object
    TypeBinder
    Namespace: USD.NET
    Syntax
    public class TypeBinder

    Constructors

    TypeBinder()

    Declaration
    public TypeBinder()

    Fields

    EnableCodeGeneration

    Use the JIT compiler to emit new functions (fast path) for type bindings. Set to false for platforms which do not support JIT compilation.

    Declaration
    public static bool EnableCodeGeneration
    Field Value
    Type Description
    Boolean

    Methods

    AddTypeAlias(SdfValueTypeName, SdfValueTypeName)

    Declaration
    public void AddTypeAlias(SdfValueTypeName alias, SdfValueTypeName target)
    Parameters
    Type Name Description
    SdfValueTypeName alias
    SdfValueTypeName target

    BindArrayType<ConverterT>(Type, Type, SdfValueTypeName, String)

    Binds the specified C# type to the given USD array and scene description (Sdf) types, looking for ConverterT.ToVtArray(csType) and ConverterT.FromVtArray(vtArrayType).

    Declaration
    public void BindArrayType<ConverterT>(Type csType, Type vtArrayType, SdfValueTypeName sdfName, string methodNamePrefix = "")
    Parameters
    Type Name Description
    Type csType

    The C# type to be mapped to USD

    Type vtArrayType

    The USD C++ value type (Vt)

    SdfValueTypeName sdfName

    The USD scene description (Sdf) type

    String methodNamePrefix
    Type Parameters
    Name Description
    ConverterT

    The C# class type providing type conversion rules ToVtArray and FromVtArray.

    BindNativeType(Type, SdfValueTypeName)

    Declaration
    public void BindNativeType(Type csType, SdfValueTypeName sdfName)
    Parameters
    Type Name Description
    Type csType
    SdfValueTypeName sdfName

    BindType(Type, UsdTypeBinding)

    Declaration
    public void BindType(Type csType, UsdTypeBinding binding)
    Parameters
    Type Name Description
    Type csType
    UsdTypeBinding binding

    GetBinding(Type, out UsdTypeBinding)

    Declaration
    public bool GetBinding(Type key, out UsdTypeBinding binding)
    Parameters
    Type Name Description
    Type key
    UsdTypeBinding binding
    Returns
    Type Description
    Boolean

    GetReverseBinding(SdfValueTypeName, out UsdTypeBinding)

    Get a binding from a USD type

    Declaration
    public bool GetReverseBinding(SdfValueTypeName key, out UsdTypeBinding binding)
    Parameters
    Type Name Description
    SdfValueTypeName key
    UsdTypeBinding binding
    Returns
    Type Description
    Boolean
    Remarks

    Used the C# type needs to be derived from the USD type. Example: UVs can be of type float2, float3, texcoord2f, texcoord2f

    GetReverseBinding(Type, out UsdTypeBinding)

    Declaration
    public bool GetReverseBinding(Type key, out UsdTypeBinding binding)
    Parameters
    Type Name Description
    Type key
    UsdTypeBinding binding
    Returns
    Type Description
    Boolean

    RemoveTypeAlias(SdfValueTypeName)

    Declaration
    public bool RemoveTypeAlias(SdfValueTypeName alias)
    Parameters
    Type Name Description
    SdfValueTypeName alias
    Returns
    Type Description
    Boolean
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Friday, June 23, 2023