- Home /
Do LayoutGroups under a disabled Canvas still get calculated?
Do I need to disable each and every LayoutGroup (and even LayoutElements?) for performance or it's disabling the parent Canvas sufficient enough?
I used to toggle off the parent gameObject but Unity recommended to just disable components.
I'm not certain, but I think disabling the Canvas will stop the rendering of everything in its hierarchy. You can check it yourself, check the number of rendered objects in the Statistics overlay of the Game view.
But if nothing else, deactivating the game object will definitely stop them from being calculated.
Answer by DawidNorasDev · Jun 18, 2018 at 07:34 AM
Disabling the parent disables all the components on it and in children. If you want to only disable one component, do that instead. But if you want to disable all components, disable game Object. Keep in mind, this will disable all behaviors you or your colleagues put on this game Object.
Your answer
Follow this Question
Related Questions
uGUI Vertical Layout Group stretching objects 2 Answers
Question regarding VerticalLayout - list is not populating correctly except during Start()! 0 Answers
How can I make Horizontal Layout Group starts from right to left? 4 Answers
How do I code a custom LayoutGroup? 0 Answers
Layout Group not working when instantiate from prefab 1 Answer