void OnEnable() { RefreshBackendList(); settings = (MadLevelSettings) target; chosenBackend = BackendToIndex(settings.profileBackend); if (chosenBackend == -1) { Debug.LogWarning("Cannot found backend " + settings.profileBackend + ", switching to default."); settings.profileBackend = typeof(MadLevelProfile.DefaultBackend).ToString(); chosenBackend = BackendToIndex(settings.profileBackend); EditorUtility.SetDirty(settings); } }
void OnEnable() { RefreshBackendList(); settings = (MadLevelSettings)target; chosenBackend = BackendToIndex(settings.profileBackend); if (chosenBackend == -1) { Debug.LogWarning("Cannot found backend " + settings.profileBackend + ", switching to default."); settings.profileBackend = typeof(MadLevelProfile.DefaultBackend).ToString(); chosenBackend = BackendToIndex(settings.profileBackend); EditorUtility.SetDirty(settings); } }