Hi all,
I’ve recently started questioning how I’m handling all my GUI elements. The game always seems to run fine, but I realized after I caught myself being inconsistent about setting SetActive = False after I set the CanvasGroup off, that I actually don’t know if there is a performance difference at that point or not.
The different GUIs are generally all set up with their own CanvasGroups, and when I toggle them, I always toggle Alpha/Interactable/Blocks Raycasts. So, if something is unseen and not blocking raycasts, (and presumably not being called or altered during this time), does it affect the performance to let the objects stay active?
A second, related question: I came across this other older post discussing the same thing, which surmises that the CanvasGroup.Alpha = 0 is enough, which I’m not sure about. But he also mentioned Graphic Raycasters, which made me also realize that I have several of these in the scene. As I said, I’m not seeing any performance hitches as I play, but is it better practice to minimize Graphic Raycasters,or does it not have much of an affect?
Thanks guys!
- Unity 2019.4
- OS: Windows 10
- Build Platform: iOS