Search Unity

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

Ignoring screen touch under button

Discussion in 'Immediate Mode GUI (IMGUI)' started by epochplus5, Oct 11, 2020.

  1. epochplus5

    epochplus5

    Joined:
    Apr 19, 2020
    Posts:
    677
    I'm not sure if this is the right section to post this question.

    Please can a mod move it to the appropriate section if its not, anyhow

    currently my whole screen is used as a button
    the left side of the screen turns my 2D plane left and right obviously right

    now i have added a UI and a button for shooting
    when i press the button it presses (no fire has been setup yet)
    but how can i get the button to ignore the direction control?

    i did google it and found something on this forum but it was from 2015 and although im sure the principal is the same, i didnt really understand where the code should go, on another script attached to the button, or in the main controller script.
     
  2. epochplus5

    epochplus5

    Joined:
    Apr 19, 2020
    Posts:
    677
    any ideas?