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. Dismiss Notice

Objects in masks outside of Rect don't render when Rect expands to encompass them

Discussion in 'UGUI & TextMesh Pro' started by draxov, Oct 1, 2014.

  1. draxov

    draxov

    Joined:
    Jun 2, 2012
    Posts:
    26
    Hey all, I think I've just found a bug with Unity 4.6 b20, as some functionality I had before has now stopped working.

    It's to do with masks and content outside their original rect, I have masks scrolling their width when clicked to reveal more information outside of their rect. But not when this happens the said information doesn't render anymore.

    I've submitted a bug report, but I thought I'd post it here for anyone else to clarify.

    I've attached the example project for all to see.

    EDIT: the case number is 636696
     

    Attached Files:

    Last edited: Oct 1, 2014
  2. PeteD

    PeteD

    Joined:
    Jul 30, 2013
    Posts:
    71
    Yep this is the same issue I had with scroll rects. The content resizer on the child objects isn't being triggered at runtime, though it looks like it is working when viewed in the scene editor.

    I found that you can force the scroll rect to trigger the child content sizer by adding a content sizer to the scroll rect. So somewhere along the line the fix in beta 19 to force these to report their sizes correctly has vanished.
     
  3. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    This is related to a feature that had some issue and has since been removed until polished some more but was too late for b20. it was an attempted optimization to not draw items that were not visible to reduce the vert count. :(
     
  4. draxov

    draxov

    Joined:
    Jun 2, 2012
    Posts:
    26
    Thanks for the explanation, it's a good idea optimisation wise, then you would be able to use masks to hide entire screens without performance cost.
     
  5. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    There would be a initial performance cost to determine if it should be hidden but then savings when it doesnt have to batch/ try to draw this invisible object.