protected override void DrawRaiseButton() { SerializedProperty property = serializedObject.FindProperty("_debugValue"); // Remove _debugValue when it is non serializable classes (interfaces, abstract classes) if (property != null) { using (var scope = new EditorGUI.ChangeCheckScope()) { Type debugValueType = GetDebugValueType(property); if (!debugValueType.IsSubclassOf(typeof(UnityEngine.Object))) { return; } GenericPropertyDrawer.DrawPropertyDrawerLayout(property, debugValueType); if (scope.changed) { serializedObject.ApplyModifiedProperties(); } } if (GUILayout.Button("Raise")) { CallMethod(GetDebugValue(property)); } } }
protected virtual void DrawValue() { using (var scope = new EditorGUI.ChangeCheckScope()) { string content = "Cannot display value. No PropertyDrawer for (" + Target.Type + ") [" + Target.ToString() + "]"; GenericPropertyDrawer.DrawPropertyDrawerLayout(Target.Type, new GUIContent("Value"), _valueProperty, new GUIContent(content, content)); GenericPropertyDrawer.DrawPropertyDrawerLayout(Target.Type, new GUIContent("Default Value"), _defaultValueProperty, new GUIContent(content, content)); if (scope.changed) { // Value changed, raise events Target.Raise(); } } }
protected virtual void DrawValue() { using (var scope = new EditorGUI.ChangeCheckScope()) { string content = "Cannot display value. No PropertyDrawer for (" + Target.Type + ") [" + Target.ToString() + "]"; GenericPropertyDrawer.DrawPropertyDrawerLayout(_valueProperty, Target.Type); if (scope.changed) { serializedObject.ApplyModifiedProperties(); // Value changed, raise events Target.Raise(); } } }
protected virtual void DrawValue() { GenericPropertyDrawer.DrawPropertyDrawerLayout(_valueProperty, Target.Type); EditorGUILayout.PropertyField(_useDefaultProperty); _useDefaultValueAnimation.target = _useDefaultProperty.boolValue; using (var anim = new EditorGUILayout.FadeGroupScope(_useDefaultValueAnimation.faded)) { if (anim.visible) { using (new EditorGUI.IndentLevelScope()) { GenericPropertyDrawer.DrawPropertyDrawerLayout(_defaultValueProperty, Target.ReferenceType); } } } }
protected override void DrawRaiseButton() { SerializedProperty property = serializedObject.FindProperty("_debugValue"); using (var scope = new EditorGUI.ChangeCheckScope()) { Type debugValueType = GetDebugValueType(property); GenericPropertyDrawer.DrawPropertyDrawerLayout(property, debugValueType); if (scope.changed) { serializedObject.ApplyModifiedProperties(); } } if (GUILayout.Button("Raise")) { CallMethod(GetDebugValue(property)); } }
protected virtual void DrawValue() { using (var scope = new EditorGUI.ChangeCheckScope()) { // If clamped and we can draw better clamp controls for this variable's type, do so. Otherwise default to showing // the default property drawer for that type. if (_isClamped.boolValue && ClampValueHelper.CanDrawClampRange(_valueProperty)) { ClampValueHelper.DrawClampRangeLayout(_valueProperty, _minValueProperty, _maxValueProperty); } else { GenericPropertyDrawer.DrawPropertyDrawerLayout(_valueProperty, Target.Type); } if (scope.changed) { serializedObject.ApplyModifiedProperties(); // Value changed, raise events Target.Raise(); } } }
protected virtual void DrawValue() { GenericPropertyDrawer.DrawPropertyDrawerLayout(_valueProperty, Target.Type); }