Hi
I have created a relatively simple 2D game where a hot air balloon is being chased and can shoot the chasers. The player has options of multiple guns that change the damage and fire rate which are both variables in the shooting script. I have then created a shop scene which changes the variables in the shooting script. The gunManager script (which changes the variables in the shooting script) has a DontDestroyOnLoad on it… The shop works if I open it first and then open the game scene (the variables are changed and the damage and wait time of the gun is correct). However when I close the game, reopen the shop and pick a different gun, it has no impact in the game scene I tried
GameObject objs = GameObject.FindGameObjectsWithTag(“GunManager”);
if (objs.Length > 1)
Destroy(this.gameObject);
as I thought the problem was multiple gunManager scenes were open. This completely broke the whole mechanic.
Is there any way I can fix this or is there a simpler way to make my shop?
Thanks