Best Practice Question regards UGUI Panel Management: Layer canvas panels OR move panels off-camera

Hello everyone,

Something I’ve been wondering (and I apologize if this has already been addressed), but I’ve seen two methods of managing panels - either layering them on-camera and controlling appearance / access via setting them active - OR - moving unused panels off-camera.

Is either method valid? Pros or cons? Performance issues?

Any thoughts would be much appreciated. If the question is unclear please let me know.

Thanks so much for your input.

I use layers and hide stuff I don’t need by setting them inactive.
This way I am sure that the positions are correct and that it is really not rendered (so it doesn’t cost performance).
Maybe the off screen stuff is culled as well but it needs at least one check to know if it can be culled.

However, for transitions I also use the off screen variant. But only to move the panel in with an animation.

Thanks for the feedback - That’s exactly what I’ve been doing as well. I find it also makes development a lot easier in that you just activate a single panel to see your UI content without having to manually change their position.

At some level I’m curious if any platforms (i.e. Android or iOS) run into problems when it comes to rendering with these inactive layers on top of the scene?

They don’t. Because inactive elements are treated as if they where not there at all. They are completely ignored, so they do not touch the render pipeline as long as they are inactive.