protected override T Edit(Rect region, GUIContent label, T element, InspectorDisabledIfAttribute attribute, fiGraphMetadata metadata)
        {
            PropertyEditorChain chain = PropertyEditor.Get(typeof(T), null);

            bool disabled = fiReflectionUtility.GetBooleanReflectedMember(typeof(T), element, attribute.ConditionalMemberName, true);

            EditorGUI.BeginDisabledGroup(disabled);
            element = chain.FirstEditor.Edit(region, label, element, metadata.Enter("InspectorDisabledIfAttribute"));
            EditorGUI.EndDisabledGroup();

            return(element);
        }
コード例 #2
0
        protected override T Edit(Rect region, GUIContent label, T element, InspectorDisabledIfAttribute attribute, fiGraphMetadata metadata)
        {
            bool disabled = fiLogicalOperatorSupport.ComputeValue(
                attribute.Operator, attribute.ConditionalMemberNames, metadata.Context);

            EditorGUI.BeginDisabledGroup(disabled);
            PropertyEditorChain chain = PropertyEditor.Get(typeof(T), null);

            element = chain.FirstEditor.Edit(region, label, element, metadata.NoOp());
            EditorGUI.EndDisabledGroup();

            return(element);
        }
        protected override float GetElementHeight(GUIContent label, T element, InspectorDisabledIfAttribute attribute, fiGraphMetadata metadata)
        {
            PropertyEditorChain chain = PropertyEditor.Get(typeof(T), null);

            return(chain.FirstEditor.GetElementHeight(label, element, metadata.Enter("InspectorDisabledIfAttribute")));
        }