docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetTraitIndex

    GetTraitIndex<T>(T)

    Converts a value to a trait index.

    Declaration
    public Binary.TraitIndex GetTraitIndex<T>(T value) where T : struct
    Parameters
    Type Name Description
    T value

    The value to be converted to a trait index.

    Returns
    Type Description
    Binary.TraitIndex

    The trait index that corresponds to the value passed as argument.

    Type Parameters
    Name Description
    T
    Remarks
    var traitIndex =
        binary.GetTraitIndex(
            Climbing.Create(Climbing.Type.Wall));
    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)