Ejemplo n.º 1
0
    public static void Initialize()
    {
        var playerInputGameObject = new GameObject("[PLAYER INPUT]");

        playerInputGameObject.AddComponent <PlayerInput>();
        Object.DontDestroyOnLoad(playerInputGameObject);

        FadeInOutSceneTransition.LoadFadeScene();
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        FadeInCompleted = false;

        DontDestroyOnLoad(this.gameObject);
    }