docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method Contains

    Contains(LayerMask, int)

    Checks whether a layer is in a LayerMask.

    Declaration
    public static bool Contains(this LayerMask mask, int layer)
    Parameters
    Type Name Description
    LayerMask mask

    The layer mask.

    int layer

    The layer index to check for.

    Returns
    Type Description
    bool

    True if the specified layer is in this mask.

    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)