public void Awake() { if (Instance != null) { Destroy(Instance.gameObject); } Instance = this; DontDestroyOnLoad(gameObject); }
private void Start() { CrossSceneObject.AddObject(gameObject); }