@@ -704,7 +704,6 @@ protected virtual void DrawFields(List<MemberInfo> fields, bool fromInspector =
704
704
MemberInfo field = fields [ i ] ;
705
705
if ( ! portsPerFieldName . ContainsKey ( field . Name ) )
706
706
{
707
- Debug . Log ( field . Name ) ;
708
707
if ( field . HasCustomAttribute < CustomBehaviourOnly > ( ) ) continue ;
709
708
DrawField ( new MemberInfoWithPath ( field ) , fromInspector ) ;
710
709
continue ;
@@ -745,27 +744,26 @@ protected virtual void DrawField(MemberInfoWithPath fieldInfoWithPath, bool from
745
744
bool serializeReference = field . HasCustomAttribute < SerializeReference > ( ) ;
746
745
if ( ( ! field . IsPublic && ! serializeField && ! serializeReference ) || field . IsNotSerialized )
747
746
{
748
- Debug . Log ( "1 " + fieldPath ) ;
749
747
AddEmptyField ( field , fromInspector ) ;
750
748
return ;
751
749
}
752
750
753
751
//skip if the field is an input/output and not marked as SerializedField
754
752
InputAttribute inputAttribute = field . GetCustomAttribute < InputAttribute > ( ) ;
755
753
bool hasInputAttribute = inputAttribute != null ;
756
- bool hasInputOrOutputAttribute = hasInputAttribute || field . HasCustomAttribute < OutputAttribute > ( ) ;
757
- bool showAsDrawer = ! fromInspector && hasInputAttribute && ( inputAttribute . showAsDrawer || field . HasCustomAttribute < ShowAsDrawer > ( ) ) ;
758
- showAsDrawer |= ! fromInspector && ( hasPortView && portView . direction == Direction . Input ) && portData . showAsDrawer ;
759
- if ( ( ( ! serializeField && ! serializeReference ) || isProxied ) && ( hasPortView || hasInputOrOutputAttribute ) && ! showAsDrawer )
754
+ bool isInput = ( ! hasPortView && hasInputAttribute ) || ( hasPortView && portView . direction == Direction . Input ) ;
755
+ bool showAsDrawer = ! fromInspector && isInput && ( inputAttribute . showAsDrawer || field . HasCustomAttribute < ShowAsDrawer > ( ) ) ;
756
+ showAsDrawer |= ! fromInspector && isInput && portData . showAsDrawer ;
757
+ if ( ( ( ! serializeField && ! serializeReference ) || isProxied ) && ( hasPortView || hasInputAttribute ) && ! showAsDrawer )
760
758
{
761
- // if (fieldPath == "customInputs" || fieldPath == "customOutputs") return;
762
759
AddEmptyField ( field , fromInspector ) ;
763
760
return ;
764
761
}
765
762
766
763
//skip if marked with NonSerialized or HideInInspector
767
- if ( field . HasCustomAttribute < System . NonSerializedAttribute > ( ) || field . HasCustomAttribute < HideInInspector > ( ) )
764
+ if ( field . HasCustomAttribute < NonSerializedAttribute > ( ) || field . HasCustomAttribute < HideInInspector > ( ) )
768
765
{
766
+ Debug . Log ( "3 " + fieldPath ) ;
769
767
AddEmptyField ( field , fromInspector ) ;
770
768
return ;
771
769
}
@@ -774,6 +772,7 @@ protected virtual void DrawField(MemberInfoWithPath fieldInfoWithPath, bool from
774
772
var showInInspector = field . GetCustomAttribute < ShowInInspector > ( ) ;
775
773
if ( ! serializeField && ! serializeReference && showInInspector != null && ! showInInspector . showInNode && ! fromInspector )
776
774
{
775
+ Debug . Log ( "4 " + fieldPath ) ;
777
776
AddEmptyField ( field , fromInspector ) ;
778
777
return ;
779
778
}
0 commit comments