Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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 ?