So I cannot use gameObject.SetActive(false) because my gameObject becomes permanently disabled and unreachable.
As an alternative I was wondering if changing its layer is a good approach, and then making that layer hidden to my camera?
Is this an accepted solution?
If so would I need to take into account children as well?
Well, why is it permanently disabled and unreachable? Are you disabling it from a script on the object itself? Can you not disable it on another script?
You could move the gameobject off screen if you needed to, but you should be able to disable it and enable it another way.
I will admit I’ve never tried the layer solution, but not sure that is the best approach.
Thanks. This particular gameObject is loaded from a separate scene. I’m already using a SetActive(false), true from an event handler on this game Object .
While it is active or current I also have another condition that requires to hide and unhide. So switching levels seems like a good alternative.