Ejemplo n.º 1
0
        private void Awake()
        {
            if (instance)
            {
                Destroy(this.gameObject);
                return;
            }
            instance = this;

            PadronizeObjectName();
            //Calls the scene loaded in the first scene manually because this component will initialize after the scene load
            OnSceneLoaded(SceneManager.GetActiveScene(), LoadSceneMode.Single);

            DontDestroyOnLoad(gameObject);
        }