Author Topic: button problem  (Read 2359 times)

caneslotocato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
button problem
« on: June 22, 2016, 09:04:48 AM »
Hello, I have one menu scene and 4 game scene. In the menu scene, i haven't problem with the button and slider. But in the game scenes, i can't do nothing. Is like if nothing happen, when i click on a button or when I go over a button(the same for the slider). I don't understand. (NGUI version: 3.8.2)
« Last Edit: June 22, 2016, 09:34:18 AM by caneslotocato »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: button problem
« Reply #1 on: June 24, 2016, 01:45:38 AM »
Enable Debug on the UICamera and you will see where events go.

caneslotocato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: button problem
« Reply #2 on: June 25, 2016, 07:44:45 AM »
I see that when the player is in scene, the gui don't work. The debug show collision only with the UI Root, but if the player isn't in scene all work. I try to disable all the component off the player, change name or layer and tag, but it doesn't work... 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: button problem
« Reply #3 on: June 27, 2016, 06:04:55 AM »
Check your cameras. The cameras that need the events need a UICamera script to be present on them. The order in which events are sent is the reverse order of the camera depths (highest depth receives events first).

caneslotocato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: button problem
« Reply #4 on: June 27, 2016, 07:51:40 AM »
The camera for the UI have the UI Camera script, the event mask can see only the collision with UI, the depth is the same for all the UI component... I really don't understand what is the problem...

caneslotocato

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: button problem
« Reply #5 on: June 28, 2016, 08:27:34 AM »
Ok, I find the problem... In the awake of the player the querieshittriggers are setted to false... I hate one programmer of the group T_T Thanks for all!