Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

UI WorldSpace broken?

Discussion in '5.4 Beta' started by ImpossibleRobert, Dec 28, 2015.

  1. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    531
    After upgrading from 5.3 in both of my projects no more sprites or texts are rendered on the UI when in WorldSpace. ScreenSpace still works fine. Is anybody else experiencing this?
     
  2. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    531
    Reported as 757719
     
  3. Art-Leaping

    Art-Leaping

    Joined:
    Apr 2, 2015
    Posts:
    22
    I'm able to build new working World Space UI, but all of my upgraded (pre 5.4) UI is broken as well.

    Edit: In my case it's because I was scalling the Canvas's Rect transform to a small value (0.005) in order to get higher resolution text/images at my scene's scale. This worked fine before, but breaks now.

    Edit 2: I was able to sort-of fix this by doing what was probably the intended method. I set the canvas to a uniform scale of 1, then added a Canvas Scaler component. I then set the Dynamic Pixels Per Unit to 200 (1/0.005) and the font size of my text to 1 (used to be 150).

    This is till a problem though, because text at a font size of 1 is HUGE in World Space mode... I need it to be smaller.

    So, instead of using Canvas Scaler - I just added a child Rect Transform to the canvas, put all my UI elements in that, and set its scale to 0.005. Done, but not ideal.

    The ideal fix would be to allow for floating-point font sizes (without breaking shared font-rendering resources due to floating point errors).
     
    Last edited: Jan 18, 2016
  4. Alex-Lian

    Alex-Lian

    Guest

    Thanks for the report. We're chasing down the issue related to the transform refactor. Fix is in-progress.
     
    Art-Leaping likes this.
  5. kuchenchef

    kuchenchef

    Joined:
    May 19, 2013
    Posts:
    5
    i have a similar issue but in my case the canvas render mode is set to screen space - camera. am using a canvas scaler component as well, scale mode 'scale with screen size'. all ui elements are on a separate layer that's rendered by a secondary camera.

    project runs fine in 5.3, after importing (and upgrading) the project into 5.4 beta all ui element are invisible. they are still in the hierarchy and buttons react to clicks, you just can't see them. when removing the secondary camera and let the main camera render everything it works fine.

    observed that behaviour in the previous and the latest beta version.
     
  6. Alex-Lian

    Alex-Lian

    Guest

    Hm, wondering if I got things backwards. I was thinking of a bug regarding screen space, not world space. Asking the UI team to weigh in.
     
  7. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    So Alex is correct. So the issue appear with any canvas that has a scale of less than 0.01. There was a assumption made in the transform refactor that caused our rendering matrix to be incorrect at that scale. This causes the rendering issue but does not affect the interaction of elements.

    @Art Leaping Its not intended to force you to have a uniform scale of 1 especially with world space canvas's where the recommendations from us is to scale the canvas down.
     
    ImpossibleRobert likes this.
  8. kuchenchef

    kuchenchef

    Joined:
    May 19, 2013
    Posts:
    5
    indeed. scale is set to 0.00833 on my canvas.
     
  9. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Yea in that case we have a fix that just needs to make it way to a release. Unfortunately there is nothing that you can do on your end to resolve the issue short of resizing the canvas.
     
  10. Art-Leaping

    Art-Leaping

    Joined:
    Apr 2, 2015
    Posts:
    22
    Thank you for being on top of this!