im currently working on a third person shooter and i have three separate scenes for each level. I already created triggers to change scenes and they work perfectly...but when i switch the scenes, my players health and ammo resets (i know the reason behind this is because in each scene , a new player prefab is added which resets all the script variables)...
how can i make it so when i switch a scene, all variables stay the same because i want to later implement picking up new guns but I can't start that if each time i switch scenes, my player is reset back to default.
I'm fairly new to all of this so if possible, provide a script or a good reference to start from.
Thanks in advance