Does using multiple World Space Canvases affect performance?
Hi, I am making a 2D game and I am wondering how to better structure my game objects. I have multiple enemies with health bars at the same time and each one is a prefab containing a canvas of its own.
Does this impact performance, and if so, how?
I have read multiple questions regarding this topic and have yet to find a definite answer. Some say it's bad. Some say it's fine. Could someone support with arguments and perhaps suggest a way to organize the project?
Thank you.
Hello!
We are stuck with the same problem. Have you figured something out regarding this issue?
Thanks!
If you are using it for display purposes only, remove the GraphicsRaycaster component. This component checks for input each frame, and is not really needed for things like health bars or floating number.
Thanks you for your responce!
We've already removed Graphics Raycaster, but the the problem is that every canavs is drawn in a separate draw call. Just having 20 healthbars drops fps by 30 on older devices.
Anyway we will keep looking for the solution and I'll post the answer here if I find smth!
Hi, did you find some solution? I am using health bars on prefabs too...
Hi, Were you able to find something on this regards. Am facing the same issue.
Update: I was using 10 WorldSpace canvas and loading in using Prefab. And my Prefab moves dynamically. This caused FPS to go down to 0 in 1 hr of game play. I had no other go to remove all the canvas and used Sprites and 3rd party TouchScript to solve my issue.
$$anonymous$$y Unity version was 5.4.2 and i also tried in 5.5.1 both are Pro versions. If Unity has solved this issue. $$anonymous$$indly update.
If you are using it for display purposes only, remove the GraphicsRaycaster component. This component checks for input each frame, and is not really needed for things like health bars or floating number. Otherwise, you will need to find a different soulution.
this does look like a really good resource for tackling this problem:
https://unity3d.com/learn/tutorials/topics/best-practices/guide-optimizing-unity-ui
Your answer
Follow this Question
Related Questions
Saving canvas to prefab 0 Answers
What is the standard way to handle UI updates that involve creating and destroying GameObjects? 0 Answers
canvas child of another canvas issue 0 Answers
How do I root UI canvas GameObject 1 Answer
How to affect only one object out of many objects with the same name using script? 0 Answers