コード例 #1
0
 protected virtual void DrawValue()
 {
     _readOnlyValueAnimation.target = _readOnly.boolValue;
     using var group = new EditorGUILayout.FadeGroupScope(_readOnlyValueAnimation.faded);
     if (group.visible)
     {
         GenericPropertyDrawer.DrawPropertyDrawerLayout(_valueProperty, Target.Type);
     }
 }
        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));
            }
        }