From a10eea6e4ce647061813519d5b0ea496f29495b9 Mon Sep 17 00:00:00 2001
From: leonard Wu <364452445@qq.com>
Date: 星期四, 09 八月 2018 09:47:08 +0800
Subject: [PATCH] 同步最新svn内容
---
Assets/Plugins/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs | 72 ++++++++++++++++++------------------
1 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/Assets/Plugins/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs b/Assets/Plugins/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs
index a56c201..78d38ef 100644
--- a/Assets/Plugins/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs
+++ b/Assets/Plugins/PostProcessing/Editor/PropertyDrawers/GetSetDrawer.cs
@@ -1,36 +1,36 @@
-using UnityEngine;
-using UnityEngine.PostProcessing;
-
-namespace UnityEditor.PostProcessing
-{
- [CustomPropertyDrawer(typeof(GetSetAttribute))]
- sealed class GetSetDrawer : PropertyDrawer
- {
- public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
- {
- var attribute = (GetSetAttribute)base.attribute;
-
- EditorGUI.BeginChangeCheck();
- EditorGUI.PropertyField(position, property, label);
-
- if (EditorGUI.EndChangeCheck())
- {
- attribute.dirty = true;
- }
- else if (attribute.dirty)
- {
- var parent = ReflectionUtils.GetParentObject(property.propertyPath, property.serializedObject.targetObject);
-
- var type = parent.GetType();
- var info = type.GetProperty(attribute.name);
-
- if (info == null)
- Debug.LogError("Invalid property name \"" + attribute.name + "\"");
- else
- info.SetValue(parent, fieldInfo.GetValue(parent), null);
-
- attribute.dirty = false;
- }
- }
- }
-}
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace UnityEditor.PostProcessing
+{
+ [CustomPropertyDrawer(typeof(GetSetAttribute))]
+ sealed class GetSetDrawer : PropertyDrawer
+ {
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
+ {
+ var attribute = (GetSetAttribute)base.attribute;
+
+ EditorGUI.BeginChangeCheck();
+ EditorGUI.PropertyField(position, property, label);
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ attribute.dirty = true;
+ }
+ else if (attribute.dirty)
+ {
+ var parent = ReflectionUtils.GetParentObject(property.propertyPath, property.serializedObject.targetObject);
+
+ var type = parent.GetType();
+ var info = type.GetProperty(attribute.name);
+
+ if (info == null)
+ Debug.LogError("Invalid property name \"" + attribute.name + "\"");
+ else
+ info.SetValue(parent, fieldInfo.GetValue(parent), null);
+
+ attribute.dirty = false;
+ }
+ }
+ }
+}
--
Gitblit v1.8.0