private void CheckForFinishedScenes() { bool activate = false; lock (updateLock) { finishedScenes.Clear(); finishedScenes.AddRange(scenes.Where(s => s.IsFinished)); foreach (var scene in finishedScenes) { if (scene is IDisposable disposable) { disposable.Dispose(); } activate |= scene == TopScene; Remove(scene); } } if (activate) { TopScene?.SceneActivated(); } }
public void Setup(TopScene sceneController, string projectFilePath) { try { manifest = JsonConvert.DeserializeObject <ProjectManifest>(File.ReadAllText(projectFilePath + "/manifest.json")); } catch (Exception ex) { Debug.LogException(ex); manifest = null; } this.projectFilePath = projectFilePath; this.sceneController = sceneController; nameLabel.text = (manifest == null) ? "<color=#FF0000>Error: Could not read manifest file...</color>" : manifest.Name; pathLabel.text = projectFilePath; modifiedLabel.text = (manifest == null) ? "Unknown" : manifest.Modified.ToShortDateString() + " " + manifest.Modified.ToShortTimeString(); string manifestFileContents = File.ReadAllText(projectFilePath + "/manifest.json"); }
private void CheckForFinishedScenes() { bool activate = false; foreach (var scene in UpdateScenes.Where(s => s.IsFinished)) { if (scene is IDisposable disposable) { disposable.Dispose(); } activate |= scene == TopScene; Remove(scene); } if (activate) { TopScene?.SceneActivated(); } }