Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics 5.4b23: Every GameObject under a Canvas adds 4 calls to "CanvasRenderer.OnTransformChanged"

Discussion in '5.4 Beta' started by -chris, Jun 30, 2016.

  1. -chris


    Mar 1, 2012
    Hi all,

    I didn't see this on the 5.4b23 Known Issues list so thought I'd post my submitted bug here to save others the trouble.

    Bug # 810190: Every GameObject under a Canvas adds 4 calls to "CanvasRenderer.OnTransformChanged".

    1. What happened
    With Unity 5.4b23, every GameObject under a Canvas adds 4 calls to "CanvasRenderer.OnTransformChanged", even if the child GameObjects are disabled.
    This has severe performance issues in my production project, as my Canvases contain thousands of child elements (though not all active at once).
    This bug was not present in 5.4b21.
    I have not used 5.4b22 so can't comment on that.

    (The repo project is just a scene with a Canvas and 2,000 GameObjects with the UI.Text components added.)

    2. How we can reproduce it using the example you attached
    Open DefaultScene.unity and click Play.
    Open the Profiler. Note there are 8,000 calls to "CanvasRenderer.OnTransformChanged" per frame, resulting in a large amount of "Total %". (there are 2,000 Text objects under the Canvas, so it's 4 calls per object)
    Note too that the 2,000 child GameObjects are disabled, so their Transforms should not be changing nor triggering these calls.


    In my production product, I had over 24,000 calls per frame in one of my scenes when most of my UI elements were loaded into the scene. The calls were adding lots of GC, as well as killing the framerate.

    Hope this gets fixed :)
    I'll go back to 5.4b21 for now.
    Peter77, movra and LeonH like this.
  2. phil-Unity


    Unity UI Lead Developer

    Nov 23, 2012
    Ooof, ok i'll look into it :).
    Peter77 and -chris like this.
  3. BrotenStudios


    Feb 13, 2014
    Maybe that is why my networking test canvas UI uwp app for xboxone grinded to a slow when built with b23.
  4. LeonH


    Oct 15, 2014
    Any news on this yet, @phil-Unity? I believe there is at least one other bug report filed that is related, #811620, if that helps (saw it mentioned on another forum).
  5. Alex-Lian



    Fix should be landing after b25.
    MonomiPark, -chris and LeonH like this.