private void OnEnable() { _isEnabledProperty = serializedObject.FindProperty("_isEnabled"); #if UNITY_5 _autoLoadProperty = serializedObject.FindProperty("_autoLoad"); #endif _defaultTabProperty = serializedObject.FindProperty("_defaultTab"); _triggerEnableModeProperty = serializedObject.FindProperty("_triggerEnableMode"); _triggerPositionProperty = serializedObject.FindProperty("_triggerPosition"); _triggerBehaviourProperty = serializedObject.FindProperty("_triggerBehaviour"); _enableKeyboardShortcutsProperty = serializedObject.FindProperty("_enableKeyboardShortcuts"); _keyboardShortcutsListProperty = serializedObject.FindProperty("_keyboardShortcuts"); _keyboardModifierControlProperty = serializedObject.FindProperty("_keyboardModifierControl"); _keyboardModifierAltProperty = serializedObject.FindProperty("_keyboardModifierAlt"); _keyboardModifierShiftProperty = serializedObject.FindProperty("_keyboardModifierShift"); _keyboardEscapeCloseProperty = serializedObject.FindProperty("_keyboardEscapeClose"); _requireEntryCodeProperty = serializedObject.FindProperty("_requireEntryCode"); _requireEntryCodeEveryTimeProperty = serializedObject.FindProperty("_requireEntryCodeEveryTime"); _entryCodeProperty = serializedObject.FindProperty("_entryCode"); _enableBackgroundTransparencyProperty = serializedObject.FindProperty("_enableBackgroundTransparency"); _collapseDuplicateLogEntriesProperty = serializedObject.FindProperty("_collapseDuplicateLogEntries"); _richTextInConsoleProperty = serializedObject.FindProperty("_richTextInConsole"); _useDebugCameraProperty = serializedObject.FindProperty("_useDebugCamera"); _debugLayerProperty = serializedObject.FindProperty("_debugLayer"); _debugCameraDepthProperty = serializedObject.FindProperty("_debugCameraDepth"); _disabledTabsProperty = serializedObject.FindProperty("_disabledTabs"); _apiKeyProperty = serializedObject.FindProperty("_apiKey"); _enableBugReporterProperty = serializedObject.FindProperty("_enableBugReporter"); _currentEntryCode = GetEntryCodeString(); _keyboardShortcutList = new ReorderableList(serializedObject, _keyboardShortcutsListProperty, true, true, true, true); _keyboardShortcutList.drawHeaderCallback += DrawKeyboardListHeaderCallback; _keyboardShortcutList.drawElementCallback += DrawKeyboardListItemCallback; _instance = this; }
private void OnSuccess(bool didSucceed, string apiKey, string email, string error) { if (!didSucceed) { _errorStatus = error; Repaint(); return; } SettingsEditor.Open(); Settings.Instance.ApiKey = apiKey; SettingsEditor.ForceRefresh(); EditorUtility.DisplayDialog("SRDebugger API", "API key has been created successfully. An email has been sent to your email address ({0}) with a verification link. You must verify your email before you can receive any bug reports." .Fmt(email), "OK"); Close(); }