public void Save() { var scenes = managers.sceneManager.GetRegisteredEntities(); for (int i = 0; i < scenes.Length; i++) { var ent = scenes[i]; var r = managers.sceneManager.WriteComponent(binaryLoader, ent, managers.sceneManager.GetNameOfScene(ent)); if (r.IsError()) { r.ShowError(MessageBoxButtons.OK, MessageBoxIcon.Warning, "When writing scene " + managers.sceneManager.GetNameOfScene(ent)); } } var names = sceneViewWindow.GetDeletedScenes(); fileRegisterWindow.RemoveFiles(names, "Scene"); SavedEvent(); }