docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method TryGetInstanceIdFromColor

    TryGetInstanceIdFromColor(Color32, out uint)

    Retrieve the ID associated with the passed in color. If the passed in color is black or cannot be mapped to an ID this service will return false, and the out id will be set to 0.

    Declaration
    public static bool TryGetInstanceIdFromColor(Color32 color, out uint id)
    Parameters
    Type Name Description
    Color32 color

    The color to map to an ID.

    uint id

    This value will be updated with the ID for the passed in color.

    Returns
    Type Description
    bool

    This service will return true if an ID is properly mapped to a color, otherwise it will return false.

    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)