docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetColorFromInstanceId

    GetColorFromInstanceId(uint)

    Retrieve the color that is mapped to the passed in ID. If the ID is 0 or 255 the returned color will be black.

    Declaration
    public static Color32 GetColorFromInstanceId(uint id)
    Parameters
    Type Name Description
    uint id

    The ID of interest.

    Returns
    Type Description
    Color32

    The color associated with the passed in ID, or black if no associated color exists.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown if the passed in ID is greater than the largest supported ID maxId

    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)