docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method IsOverUIGameObject

    IsOverUIGameObject()

    Use this to determine if the ray is currently hovering over a UI GameObject.

    Declaration
    public bool IsOverUIGameObject()
    Returns
    Type Description
    bool

    Returns true if hovering over a UI element. Otherwise, returns false.

    Remarks

    enableUIInteraction must be enabled, otherwise the function will always return false.

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