Exemple #1
0
        private void HandleNewAttribute(ToolboxAttribute attribute)
        {
            switch (attribute)
            {
            case ToolboxListPropertyAttribute a:
                TryAssignListPropertyAttribute(a);
                break;

            case ToolboxSelfPropertyAttribute a:
                TryAssignSelfPropertyAttribute(a);
                break;

            case ToolboxDecoratorAttribute a:
                TryAssignDecoratorAttribute(a);
                break;

            case ToolboxConditionAttribute a:
                TryAssignConditionAttribute(a);
                break;

            case ToolboxArchetypeAttribute a:
                var composition = a.Process();
                foreach (var newAttribute in composition)
                {
                    HandleNewAttribute(newAttribute);
                }
                break;
            }
        }
Exemple #2
0
        public override sealed void OnGuiEnd(ToolboxAttribute attribute)
        {
            if (attribute is T targetAttribute)
            {
                OnGuiEnd(targetAttribute);
                return;
            }
            else
            {
                UnityEngine.Debug.LogError("Target attribute not found.");
            }

            base.OnGuiEnd();
        }
Exemple #3
0
        public override sealed void OnGui(SerializedProperty property, ToolboxAttribute attribute)
        {
            if (attribute is T targetAttribute)
            {
                OnGui(property, targetAttribute);
                return;
            }
            else
            {
                Debug.LogError("Target attribute not found.");
            }

            base.OnGui(property, attribute);
        }
 public override sealed void OnGui(SerializedProperty property, GUIContent label, ToolboxAttribute attribute)
 {
     OnGui(property, label, attribute as T);
 }
 public virtual PropertyCondition OnGuiValidate(SerializedProperty property, ToolboxAttribute attribute)
 {
     return(OnGuiValidate(property));
 }
Exemple #6
0
 public override sealed void OnGuiClose(ToolboxAttribute attribute)
 {
     OnGuiClose(attribute as T);
 }
Exemple #7
0
 public override sealed void OnGuiBegin(ToolboxAttribute attribute)
 {
     OnGuiBegin(attribute as T);
 }
Exemple #8
0
 public override sealed void OnGuiEnd(ToolboxAttribute attribute)
 {
     OnGuiEnd(attribute as T);
 }
Exemple #9
0
 public virtual void OnGuiEnd(ToolboxAttribute attribute)
 {
     OnGuiEnd();
 }
        public override sealed PropertyCondition OnGuiValidate(SerializedProperty property, ToolboxAttribute attribute)
        {
            if (attribute is T targetAttribute)
            {
                return(OnGuiValidate(property, targetAttribute));
            }
            else
            {
                Debug.LogError("Target attribute not found.");
            }

            return(base.OnGuiValidate(property, attribute));
        }
 public sealed override PropertyCondition OnGuiValidate(SerializedProperty property, ToolboxAttribute attribute)
 {
     return(OnGuiValidate(property, attribute as T));
 }
Exemple #12
0
 public abstract void OnGuiClose(ToolboxAttribute attribute);
Exemple #13
0
 public abstract void OnGuiBegin(ToolboxAttribute attribute);
Exemple #14
0
 public virtual void OnGui(SerializedProperty property, ToolboxAttribute attribute)
 {
     OnGui(property);
 }
Exemple #15
0
 public virtual void OnGuiBegin(ToolboxAttribute attribute)
 {
     OnGuiBegin();
 }
Exemple #16
0
 public abstract PropertyCondition OnGuiValidate(SerializedProperty property, ToolboxAttribute attribute);
 public abstract void OnGui(SerializedProperty property, GUIContent label, ToolboxAttribute attribute);
 public abstract void OnGuiEnd(ToolboxAttribute attribute);