public static void BeginDream(string level) { if (CurrentlyInDream) { return; } CurrentlyInDream = true; RandUtil.RefreshSeed(); StaticityAccumulator = 0; HappinessAccumulator = 0; string levelToLoad = level; RefreshTextureSet(true); // populate payload with textureset info and level to load Payload = GameObject.FindGameObjectWithTag("DreamPayload").GetComponent <DreamPayload>(); Payload.DreamSeed = RandUtil.CurrentSeed; Payload.InitialLevelToLoad = levelToLoad; ResourceManager.ClearLifespan(ResourceLifespan.MENU); // load dream scene Fader.FadeIn(Color.black, 1.5F, () => { SceneManager.LoadScene("dream"); }); }