Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question World Space button under Screen Space Overlay

Discussion in 'UGUI & TextMesh Pro' started by oserheiev, Aug 4, 2022.

  1. oserheiev

    oserheiev

    Joined:
    Mar 24, 2021
    Posts:
    4
    Hello Colleagues,

    I am curious about the following question and I need your opinion about a better implementation.

    I need to add a button that appears above buildings and I have a touch joystick that appears when a player touches the screen. So when a player touches a button the joystick appears and it does not pass the event to the button.

    The joystick (Screen Space Overlay) is located under UI (Canvas) -> Joystick
    The button (World Space) is located under Map -> SceneGameObject -> Canvas -> Button

    I would like to achieve a behavior like this:
    - Press on a button -> Joystick is disabled
    - Press and drag over the button -> Joystick is enabled

    How would you solve it ?