protected void DrawValue() { using (var scope = new EditorGUI.ChangeCheckScope()) { string content = "Cannot display value. No PropertyDrawer for (" + Target.Type + ") [" + Target.ToString() + "]"; GenericPropertyDrawer.DrawPropertyDrawer(Target.Type, _valueProperty, new GUIContent(content, content)); if (scope.changed) { // Value changed, raise events Target.Raise(); } } }
private void DrawElement(Rect rect, int index, bool isActive, bool isFocused) { rect.height = EditorGUIUtility.singleLineHeight; rect.y++; SerializedProperty property = _reorderableList.serializedProperty.GetArrayElementAtIndex(index); EditorGUI.BeginDisabledGroup(DISABLE_ELEMENTS); EditorGUI.LabelField(rect, "Element " + index); rect.width /= 2; rect.x += rect.width; string content = "No PropertyDrawer for " + Target.Type; GenericPropertyDrawer.DrawPropertyDrawer(Target.Type, property, new GUIContent(content, content)); //EditorGUI.ObjectField(rect, "Element " + index, property.objectReferenceValue, Target.Type, false); EditorGUI.EndDisabledGroup(); }
protected void DrawValue(SerializedProperty valueProperty) { if (_valueChangedInInspector) { _valueChangedInInspector = false; Target.Raise(); } using (var scope = new EditorGUI.ChangeCheckScope()) { string content = "Cannot display value. No PropertyDrawer for (" + Target.Type + ") [" + Target.ToString() + "]"; GenericPropertyDrawer.DrawPropertyDrawer(Target.Type, valueProperty, new GUIContent(content, content)); if (scope.changed) { // Value changed, raise events //Target.Raise(); _valueChangedInInspector = true; } } }