This is my hierarchy:
Player
>Gun1
>Gun2
This is really annoying, I activate and deactivate guns for my player to use them one at a time, but unity just deactivates my whole player.
the code has a variable set to the specific Gun GameObject, which I drag the prefab into the space…
GameObject primaryGun;
and then I reference it and tell it to deactivate itself in my shoot function…
primaryGun.SetActive(false);
but it ends up with the whole player being deactivated.