// Use this for initialization void Start() { eggCounter = FindObjectOfType <EggCounter>(); eggGoals = new Dictionary <string, int> { { "Level_1", 3 }, { "Level_2", 2 }, { "Level_3", 1 }, { "Level_4", 4 } }; }
void OnLevelWasLoaded() { Debug.Log(SceneManager.GetActiveScene().name); eggCounter = FindObjectOfType <EggCounter>(); }