Forum rules - please read before posting.

Unity UI - dont walk on click

Hi,
i have some unity ui elements in the game and if i click on them the character also walks. how can i change this?

greetz

Comments

  • Register the boundary of the the UI as your Menu's RectTransform in the Menu Manager.
  • edited August 2016
    you mean i should make empty placeholder in ac menu?
    i have also a popup which appears in the middle of the screen. the solution will not work for this kind of ui? is it possible to deactivate, pause or something the movement via code? 
  • Clicking an AC Menu will automatically "block" clicks to the NavMesh.  For UI Menus, clicks within the RectTransform should do the same thing - an empty RectTransform gameobject that marks out the intended area can be used, yes.

    You can also either pause the game when the Menu appears (check Pause game when enabled? in the Menu Manager), or use the Engine: Manage systems Action when the Menu is turned on to disable the Movement system (and re-enable it when the Menu turns off).
  • whats the best method for pause a game from code?  AC.KickStarter.mainCamera.PauseGame(true) ?
  • Yes, that will work.  Alternatively, you could turn on an invisible Menu that's set to pause the game when it's enabled.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.