I have an object to hold the game mode selected data attributed with DontDestroyOnLoad(transform.gameObject). Once I load my next scene it’s still alive but once I load any scene farther it is destroyed. How do I keep it going through? Attached is my script holding the gamemode.
public class gameMode : MonoBehaviour {
// 1 = TAPTAP; 2 = TOW;
public int game = 0;
void Awake () {
DontDestroyOnLoad(transform.gameObject);
}
}