Search Unity

GUI Button, doesn't work in World Space.

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by Otactu, Aug 27, 2014.

  1. Otactu

    Otactu

    Joined:
    May 22, 2014
    Posts:
    24
    So,

    If i'm in "Screen space - Overlay " mode in canvas. Button works.

    And if i'm in "World Space", button does'nt react.

    Any idea ? (I tried five time from scratch with almost all the setting I see ><)
     
  2. Otactu

    Otactu

    Joined:
    May 22, 2014
    Posts:
    24
    Problem Solved :

    You have to select a camera, in "Canvas < Render Mode < Event Camera" :)
     
  3. cowmeat

    cowmeat

    Joined:
    May 23, 2014
    Posts:
    1
    thanks had the same problem!
     
    k-ina likes this.
  4. paulrich_nb

    paulrich_nb

    Joined:
    Feb 22, 2016
    Posts:
    1
    Thanks was having same problem.
     
    k-ina likes this.
  5. Deleted User

    Deleted User

    Guest

    Thank you so much Otactu, I've been having this problem for weeks now and thought about the RayCaster and button texts and Canvas's, also backrounds and about the canvas being in the negative in the scale, but this was the problem all along. Thanks much!!!!
     
    k-ina likes this.
  6. rifaterdemsahin

    rifaterdemsahin

    Joined:
    Sep 3, 2016
    Posts:
    8
  7. EEDemir

    EEDemir

    Joined:
    May 27, 2015
    Posts:
    3
    If its not the case also try removing check on Graphic Raycaster > Ingore Reversed Graphics on WorldSpace Canvas which worked for me.
     
    Quast, UnityTester33 and hema_dubal like this.
  8. hema_dubal

    hema_dubal

    Joined:
    Oct 27, 2016
    Posts:
    6
    Oh this worked for me! Thanks a lot :D
     
  9. sedat38

    sedat38

    Joined:
    Apr 2, 2017
    Posts:
    1
    If you still having this issue check if your event camera is in front of your world space canvas. It may be able to see behind because of Clipping Planes parameters.
     
  10. thudme22

    thudme22

    Joined:
    Aug 31, 2017
    Posts:
    3
    Totally work for me!!
    Thank you very much!!
     
    k-ina likes this.
  11. UnityTester33

    UnityTester33

    Joined:
    Dec 17, 2016
    Posts:
    5
    This works for me as well
     
  12. bapplegate

    bapplegate

    Joined:
    Nov 19, 2015
    Posts:
    1
    ALSO -> Make sure you do not have a VR headset plugged in!
     
    unity_gNW0EDdZ9VCLGg likes this.
  13. H-Ishfaq-Ahmad

    H-Ishfaq-Ahmad

    Joined:
    Aug 1, 2017
    Posts:
    1
    Thanks . it solved my problem
     
    k-ina likes this.
  14. o-san

    o-san

    Joined:
    Jun 23, 2018
    Posts:
    12
    I’m having the same problems but the above solutions does not help. Ive read through and looked at the various unity docs and videos.

    The event camera is set and I have tried setting the ignore reversed graphics checkbox. Are there any other considerations i might have missed?

    I can’t see anything that might block the camera view and the buttons are visible. Is there a way to debug what the selection ray hits?
    ____
    edit:
    solved it, had another canvas on top of the one I was trying to interact with. It was in screen overlay mode. When going through the scene view and trying to figure out if anything blocked the rays it didn't show (quite obvious since it was in overlay mode).
     
    Last edited: Jan 9, 2019
    leonardofmed, k-ina and kcfos like this.
  15. davalosweldon

    davalosweldon

    Joined:
    Jan 31, 2018
    Posts:
    4
    The problem for me was that the ARCamera in scene was culling everything except UI. I changed the Layer of the canvas to default and it fixed the problem.
     
  16. SummerBearStudio

    SummerBearStudio

    Joined:
    May 2, 2018
    Posts:
    1
    If turning on reverse raycasting worked for you, you probably rotated the world space canvas so that its forward vector it pointing away from the camera. You can fix this by rotating it around so that the green translation gizmo points towards the camera. Turning on reversed raycasting will fix the problem, but you may get weird behavior in more complicated setups!
     
  17. Birgere

    Birgere

    Joined:
    Feb 8, 2016
    Posts:
    16
    If any of this still isn't working, try moving the EventHandler so that it isn't inside the Canvas inside the hierarchy.
    Also make sure you've got one aswell.
     
  18. unity_gNW0EDdZ9VCLGg

    unity_gNW0EDdZ9VCLGg

    Joined:
    May 21, 2018
    Posts:
    1
    That worked for me, thanks!
     
  19. kryzodoze

    kryzodoze

    Joined:
    Nov 6, 2013
    Posts:
    17
    If all of this still isn't working for you, try increasing the "Order in Layer" on the Canvas.
     
  20. tik_tikkers

    tik_tikkers

    Joined:
    Jan 5, 2018
    Posts:
    14
unityunity