protected override void DrawSettings() { // TARGET EditorGUILayout.LabelField(_targetTitleContent, EditorStyles.boldLabel); GUILayout.BeginVertical("box"); _reflectionDrawer.DrawLayout(); GUILayout.EndVertical(); //SETTINGS EditorGUILayout.LabelField(_settingsTitleContent, EditorStyles.boldLabel); GUILayout.BeginVertical("box"); GUI.color = _informOnChangedProperty.boolValue ? Color.green : Color.red; if (GUILayout.Button(_informOnChangedContent)) { _informOnChangedProperty.boolValue = !_informOnChangedProperty.boolValue; } GUI.color = Color.white; if (!_informOnChangedProperty.boolValue) { EditorGUILayout.PropertyField(_informIntervalProperty, _informIntervalContent); if (_informIntervalProperty.floatValue < 0) { _informIntervalProperty.floatValue = 0; } EditorGUILayout.HelpBox("Set to 0 for send message with each frame.", MessageType.Info); } GUILayout.EndVertical(); }
protected virtual void DrawSettings() { var _defaultColor = GUI.color; // TARGET EditorGUILayout.LabelField(_targetTitleContent, EditorStyles.boldLabel); using (new GUILayout.VerticalScope(OSCEditorStyles.Box)) { _reflectionDrawer.DrawLayout(); } //SETTINGS EditorGUILayout.LabelField(_settingsTitleContent, EditorStyles.boldLabel); using (new GUILayout.VerticalScope(OSCEditorStyles.Box)) { GUI.color = _informOnChangedProperty.boolValue ? Color.green : Color.red; if (GUILayout.Button(_informOnChangedContent)) { _informOnChangedProperty.boolValue = !_informOnChangedProperty.boolValue; } GUI.color = _defaultColor; if (!_informOnChangedProperty.boolValue) { EditorGUILayout.PropertyField(_informIntervalProperty, _informIntervalContent); if (_informIntervalProperty.floatValue < 0) { _informIntervalProperty.floatValue = 0; } EditorGUILayout.HelpBox("Set to 0 for send message with each frame.", MessageType.Info); } } }