public static void Initialize() { var playerInputGameObject = new GameObject("[PLAYER INPUT]"); playerInputGameObject.AddComponent <PlayerInput>(); Object.DontDestroyOnLoad(playerInputGameObject); FadeInOutSceneTransition.LoadFadeScene(); }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this.gameObject); } FadeInCompleted = false; DontDestroyOnLoad(this.gameObject); }