private void OnInspectorUpdate() { EditorStyles.helpBox.fontSize = 12; EditorStyles.toolbar.fontSize = 12; if (gec && pickedEvent) { gec.Events.Add(pickedEvent); pickedEvent = null; gec = null; searchString = ""; GUI.FocusControl(""); } if (pickedScene) { if (EventManager) { bool alreadyThere = false; for (int i = 0; i < EventManager._Scenes.Count; i++) { var guid1 = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(EventManager._Scenes[i])); var guid2 = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(pickedScene)); if (guid1.Equals(guid2)) { alreadyThere = true; break; } } if (!alreadyThere) { EventManager._Scenes.Add(pickedScene); } pickedScene = null; GUI.FocusControl(""); searchString = ""; } } if (collectionToDeleteFrom && toBeDeletedEvent) { collectionToDeleteFrom.RemoveEvent(toBeDeletedEvent); toBeDeletedEvent = null; collectionToDeleteFrom = null; GUI.FocusControl(""); searchString = ""; } if (toBeDeletedScene) { if (EventManager) { EventManager.RemoveScene(toBeDeletedScene); toBeDeletedScene = null; GUI.FocusControl(""); searchString = ""; } } if (CurrentTab == 1) { if (EventManager) { EventManager.FindAllEvents(); } } }