Sometimes you have objects that have inside them lots of “smaller and less complex” like a first person character for example.
lets assume that this character has a first person controller (an object that acts as a container for the others, and it has some scripts), also he has a model mesh with an armature, he also has weapons attached to his hands and lots of other things inside it.
now the situation, we have two characters, a First Person one, and a Third Person one, we need to toggle between them with a button, but we want it to spawn where the player was when he pressed the button, also we need to disable all the actions and aswell hide him when we do that, (we don’t want to walk with our other player and them see ourselves walking out there like it was another character)
How would we fix that? probably the simples way would be disable the First person, and enable the third person in its place and vice versa.
in unity we could do that using GameObject.active = false;
GameObject in this case is our “container” with lots of scripts, meshes, and other cool things the ” .active ” is a class from GameObject in unity, the false is like toggling a light off, and true toggling on.
if we did something like this:



