Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Worldspace Canvas appears in editor not in Game.

Discussion in 'UGUI & TextMesh Pro' started by Riscvul, Oct 31, 2014.

  1. Riscvul

    Riscvul

    Joined:
    Dec 18, 2012
    Posts:
    5
    Ok I've been working on this all day and I can't find anything on this.

    I have a screenspace overlay for my regular gui elements and I'm trying to create some worldspace elements to float around a sphere I have made.

    All of the worldspace canvas I create appear in the editor exactly how I want them, but in game they cannot be seen. If I switch to the scene view while running the game they are there visible and in the right places but invisible in the actual game.

    Here is a screenshot : http://screencast.com/t/nVGa7tetBlI

    I'm sure there is just a simple setting I just haven't figured out how to set yet but I can't find any information to help me. Anybody have any suggestions?
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    i'm going out on a limb as i dont have much information, but are you world space canvas's on a layer that the camera can draw. GUI is put on the UI layer and i'm not 100% sure if cameras render that layer.
     
  3. Riscvul

    Riscvul

    Joined:
    Dec 18, 2012
    Posts:
    5
    Oh thank you! That was exactly it.
     
  4. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    I put the Canvas in the default layer, but it isn't showing in game view. Any suggestions?

    Edit: solved it somehow. No idea how.
     
    Last edited: Feb 22, 2015
    rahulk1991 likes this.
  5. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    araz01 likes this.
  6. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    110
    Hey,

    Same issue here :

    After upgrading our project to 5.3.4p4, we noticed that our UI elements are not anymore rendered to the RenderTexture used in the materials.
    After making a simple repro project, this looks like a serious bug from Unity :

    1. Create a new UI Canvas with a simple text in World Space
    2. Create a camera that renders only the UI layer in a RenderTexture
    3. Use this RenderTexture as Albedo on a new material, and assign this material to a quad rendered by the MainCamera
    4. The text isn't displayed (works with 5.3.4f1, don't work on 5.3.4p4 / p5)

    I submitted a bug report, then i noticed that FiveFingers already reported it :

    https://issuetracker.unity3d.com/issues/ui-elements-arent-rendered-to-rendertexture
     

    Attached Files:

  7. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    It also seems to not be working in 5.3.4p6. I upgraded my Unity to it today and my UI isn't working.
    Should I upgrade to one of those 5.4 beta builds if this keeps going on?
    upload_2016-5-6_15-51-0.png
    It says that it's fixed in 5.3.6 but what the hell does that mean???
     
  8. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    110
    Same here, the bug still exists. The only line in the changelog about Render Texture is this one :

    "(none) - VR: Fixed an issue with incorrect Render Texture size being used. Most notable with deferred rendering."

    and it's actually not related to this bug.
     
  9. luisanton

    luisanton

    Joined:
    Aug 25, 2009
    Posts:
    325
    Same here. We have some labels using a worldspace canvas that are renderer on the editor but not when building to iOS nor Android.
     
  10. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    I just updated to Unity 5.4.0b17 and it appears to be fixed...
     
  11. luisanton

    luisanton

    Joined:
    Aug 25, 2009
    Posts:
    325
    I should say I was misguided by forum messages... Our problem was a different one, but the effect was exactly this one. X)
     
  12. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Just started having this issue today? Running Unity 5.3.4f1, anybody else still experiencing it or have a workaround? Was working fine yesterday uggghh,,,,
     
  13. wildWind

    wildWind

    Joined:
    Jan 18, 2016
    Posts:
    4
    Same here in Unity5.3.4p6 .Unity's UI Canvas do not show in Cardboard when use worldspace UI . The UI can't be render to the texture cardboard used .
    And in Unity5.3.4.f1 ,the problem doesn't exist.
     

    Attached Files:

  14. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    Yeah I noticed that too. In Unity 5.4.0b17 it doesn't appear to exist...
    Maybe it'll be fixed in the official Unity 5.4 update, but who knows.
     
  15. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    upload_2016-5-20_17-34-57.png
    Appears as if it's back on Unity 5.4.0b18
     
  16. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    110
    Still not working for me on 5.4.0b18 with my repro project.
     
  17. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    The only solution that I can think of (and am using right now) is to turn off the Distortion corrector.
     
  18. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Still happens in 5.3.5f1 despite it being listed as fixed in the changelog
     
  19. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Filed Bug Report, Issue 799554
     
  20. wildWind

    wildWind

    Joined:
    Jan 18, 2016
    Posts:
    4
    I have been told from the Unity staff that this issue will be fixed in version5.6;
    and now i'am using version Unity 5.3.4p1 ,everything is fine .
     
  21. NConcepts

    NConcepts

    Joined:
    Nov 20, 2015
    Posts:
    2
    It's incredible !
    Without this fix, we can't maintain neither develop VR app for which one the World Canvas is mandatory.
    So many versions already with this bug and no solutions.

    I confirm that we get it with the Beta 5.4.0b18 / Google Cardboard 0.8.0

    Thanks wildWind, I just downgraded Unity to 5.3.4f1 and it seems fine for now.
    I could re-import my project despite their warning message saying that it's not supported.

    Let's keep monitoring it.
     
    Last edited: May 24, 2016
  22. howardt12345

    howardt12345

    Joined:
    Jan 4, 2016
    Posts:
    31
    Really hoping that it's going to be fixed in the official Unity 5.4.0 release
     
  23. madvas

    madvas

    Joined:
    Jun 14, 2015
    Posts:
    6
    5.4.0b20 still not fixed
     
  24. itskenmoore

    itskenmoore

    Joined:
    Jun 11, 2016
    Posts:
    2
    5.4.0b21 still not fixed
     
  25. Freezy

    Freezy

    Joined:
    Jul 15, 2012
    Posts:
    234
    5.3.5p3 also not fixed :-(
     
  26. Jose_Gallardo

    Jose_Gallardo

    Joined:
    Jul 29, 2010
    Posts:
    42
    Same here, returning to 5.3.4 because this looks like the unique one working...

    Crazy stuff
     
  27. Freezy

    Freezy

    Joined:
    Jul 15, 2012
    Posts:
    234
    5.3.5p5 fixed it
     
    pixxelbob likes this.
  28. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    It comes back sometimes if you tweak ui properties or resize game view. I'm just putting up with it until 5.3.6 or 5.4 but thanks for letting us know @Freezy
     
  29. dannymac7

    dannymac7

    Joined:
    Aug 1, 2016
    Posts:
    1
    5.3.6f1 fixed it for me
     
  30. hellcaller

    hellcaller

    Joined:
    May 19, 2010
    Posts:
    381
    5.4 World space canvas can't see locked cursor input anymore. Worked fine in 5.4beta. Please help!
     
  31. DaReign

    DaReign

    Joined:
    Apr 12, 2013
    Posts:
    78
    Unity 5.5.1f1 more than a 2 years later and the bug still exist :(
     
  32. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
  33. grobm

    grobm

    Joined:
    Aug 15, 2005
    Posts:
    217
    No the issue came back in Unity 5.5.2. This is a case of poor version controls at Unity Tech... I would love a hot patch if this was not fixed in 5.5.3. I am working in iOS and it does not draw canvas in iOS device SDK. It works only in simulated SDK, but then my iOS level code does not work in simulation.

    If I add an "old school" onGui function and UI button it works... but not the Canvas UI. All Canvas elements fail to load for me. Whats annoying is I am getting now errors on the iOS console. I have tried both build methods... (IL2CPP or Mono2x)

    Off to read patch notes.. !!!
     
  34. Shaolin-Dave

    Shaolin-Dave

    Joined:
    Apr 3, 2015
    Posts:
    32
    Still having this issue in 5.6
    Changing layers didn't help.
     
  35. alxcancado

    alxcancado

    Joined:
    Aug 17, 2013
    Posts:
    13
    Gee, I got this too 5.6.1f1
     
  36. UnaiLz

    UnaiLz

    Joined:
    Dec 12, 2015
    Posts:
    46
    2017.1.0 aaaand still not working, but it was working on 5.4.0

    What we can do??
     
  37. LtKelleyUSMC

    LtKelleyUSMC

    Joined:
    Oct 6, 2012
    Posts:
    44
    I got a question for all you people: WHY are you putting up with waiting until UNITY fixes a problem that YOU FOUND?
    Shouldn't it be that we use software that has ALREADY BEEN FIXED? I know it is an accepted practice that we RESEARCH this stuff, but this is taking away from time that we can be programming and designing, right?
    SHOULDN'T WE BE GETTING PAID FOR FINDING THESE BUGS, because we have already paid for software that IS NOT WORKING, so why are we having to find these problems for THEM???
    THINK ABOUT IT THIS WAY...
    This is like buying a new car, and instead of being able to go to the store, we have to do some tuneup on the car everytime, cause it keeps missing... and well, forget about going to the store, cause the car keeps missing. If your car did this, wouldn't you be a little peav'd. I personally don't want a car that is in this kind of shape... In Texas, we have what is called a LEMON LAW. Perhaps we need a LEMON LAW in the software world. Then, they are forced to MAKE SURE THE SOFTWARE WORKS COMPLETELY, or they can't sell it!!!
     
    JDCaptainAmerica likes this.
  38. Hiyek

    Hiyek

    Joined:
    Nov 28, 2017
    Posts:
    3
    Posting here to also vote for a hotfix. This is bs.

    & lol at the post before mine. Someone doesn't quite understand software development..
     
  39. Sixbraker

    Sixbraker

    Joined:
    May 20, 2017
    Posts:
    8
    im having the same issue. it worked then i manipulated the UI using code, then now it no longer shows on camera even though it's on the same layer.

    I am using a UI on worldspace, with a canvas attached to a gameobject; both having the layer which the camera should render.

    I am using Unity 5.6.1f1

    P.S. I am using a Render Texture to render what the Camera sees.
     
  40. TheRealRws

    TheRealRws

    Joined:
    Mar 13, 2018
    Posts:
    1
    I have this issue in unity 2018.2.4f1
     
  41. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    I too am having an issue where world space canvases work in the editor and not in the build. The funny thing is, they worked perfectly a couple of days ago even using the HDRP, but since then I've added a RenderTexture and some custom shader nodes as well as a few other things, and I might have changed some camera settings as well. I'll see if I can figure out a workaround. What a weird problem!
     
  42. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Update: I'd added a new camera that was rendering to a target RenderTexture. When it's outputting to that RenderTexture, none of my worldspace canvases work. When it isn't, all of my worldspace canvases work.

    This appears to be related to scriptable render pipelines, as in this thread: https://forum.unity.com/threads/all...ible-when-using-render-texture-on-two.545139/

    And it looks like it's fixed in the 2018.3 beta.
     
  43. gogocook25

    gogocook25

    Joined:
    Sep 30, 2018
    Posts:
    36
    i am having the same issue in 2018.2.12
     
  44. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,294
    We've encountered similar weird issue with this setup:
    Cameras: All layers except next -> UI -> Overlay FX -> Overlay UI;

    World space canvases are rendered as a part of UI and Overlay UI.
    UI is visible and running fine in the editor, but on mobile device it just doesn't render anything at all. Unless 4-th camera is disabled.

    Only first and third cameras rendering. No script errors or any other errors found via logcat.

    So there's either a hidden limit of how many cameras can be used for rendering, or this is a bug with 2019.1.
     
  45. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    should be no limit. check the display they are rendering to. in editor displays sometimes are ignored on device they are not.
     
  46. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,294
    Yeah, I've figured out this one.
    It was caused by an extra script that was attaching canvas.worldCamera to the wrong one.

    Its weird that changing worldCamera on canvas also changes where UI elements are rendered to.
    I've always thought it is driven by the layer of the UI elements and culling mask setup on the camera.
     
  47. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Yeah it shouldn't matter i'll take a quick look see if something is wrong.

    Edit: Yup surprised i've not seen a bug on this. We were always rendering directly to the camera specified even for world space (which should render everywhere). Fixed likely for 19.3.
     
    Last edited: Aug 27, 2019
    xVergilx likes this.
  48. Kamil_Reich

    Kamil_Reich

    Joined:
    Aug 14, 2014
    Posts:
    193
    In my case problem was in my layer cull script. I used:
    GetComponent<Camera>().layerCullDistances = distanceCull; // distanceCull is array set up from inspector.
    For UI I used 1 meter, for camera UI that wasn't problem. Problem came with world canvas UI :D