docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetTypeIndex

    GetTypeIndex<T>()

    Converts the generic type into a type index.

    Declaration
    public Binary.TypeIndex GetTypeIndex<T>() where T : struct
    Returns
    Type Description
    Binary.TypeIndex

    The type index that corresponds to the generic type.

    Type Parameters
    Name Description
    T
    Remarks

    Given a type passed as generic argument, this method performs a lookup in the types stored in the runtime asset and returns the corresponding type index. This index can then be used to extract reflection information for the given type. The returned type index will be invalid if the generic type passed as argument can not be found in the runtime asset.

    See Also
    GetType(int)
    In This Article
    Back to top
    Copyright © 2024 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)