Search Issue Tracker
Fixed in 2017.2.0f3
Votes
12
Found in
5.5.0b9
Issue ID
846631
Regression
Yes
CanvasRenderer.OnTransformChanged is called on UI objects which transforms are not moving
How to reproduce:
1. Download and open the project from OwnCloud
2. Open LipSync scene
3. Open Profiler (Window -> Profiler)
4. Play the scene
5. Notice that CanvasRenderer.OnTransformChanged is called 162 times
6. Stop the scene
7. Add Button to Container in hierarchy (UI -> QuestSystemPro_Canvas ->QuestWindow_PFB -> Container)
8. Play the scene
9. Notice that CanvasRenderer.OnTransformChanged is called 174 times (+12 times)
Note: I haven't been able to reproduce this issue on new project
Reproducible: 5.5.0b1, 5.5.0b11. 5.6.0a2
Not reproducible: 5.4.2p3
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Color property '_BaseColor' missing
- Point Light source stops lighting when moved out of camera frustum in Player while having 2 directional lights in scene present, and a fog enabled by script
- Sky does not get rendered when 'CameraRelativeRendering' is disabled
- Dropdown UI elements have their Content misplaced when nested inside a Prefab containing a root object with a Canvas Component
- “'UnityMetaVertexPosition': implicit truncation of vector type" Shader warning when compilating URP ShaderGraph shaders
Stanley
Oct 17, 2019 09:31
It's ok I've properly read you comment and I've been able to reduce the calls massively thanks!
Stanley
Oct 17, 2019 08:10
I know this is old but I have a project on an older version of Unity.
A workaround was mentioned but I can see it anywhere.
Do you know what it was?
x4000
Jun 22, 2017 15:57
Holy cow, this is a major thing to find out. The workaround is really really nice. I was having terrible spikes in GUI performance, and between 1000 and 6000 calls to this method for a gui that was just sitting there. I think this may actually be bleeding down to disabled canvases, but I'm not positive.
This is on 5.6.1p1. The workaround of putting my overlay canvases all underneath a "Canvases" root object that is at position 0,0,0 (rather than an unmoving root object that happened to be somewhat offset) works great, though. My average calls to this method fell to under 100 per frame. Not sure why it still has a baseline of 64 calls even when nothing is happening, but I'll take it.
ZZantal
Feb 16, 2017 08:02
This happens when the Canvas is parented to a GameObject (without canvas) whose position is non zero.
If you remember it was once possible to do this and move the parent object resulting in the UI to not be centered on the screen anymore.
They then proceeded to "fix" this behaviour.
Programming is hard =S
kanyka
Jan 20, 2017 13:51
Reproducible in 5.5.0p3 and 5.5.0p4