HI there,
so i am making a script which has a publically declared varible.
public GameObject playerShip;
then i assign the variable a gameobject
playerShip = GameObject.FindGameObjectWithTag("Player");
in the game i have a player selection screen. the user selects a ship, then plays. I have all 4 ships in the game scene. the one the user selects, remains active the other are inactive (by setactive(false)). All four ships have the tag, ‘Player’. the problem is that the gameobject variable randomly selects active or inactive ships. i want it to look for gameobject with tag which are only active.
thanks in Advance
Note*I am a noob