File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Assets/com.alelievr.NodeGraphProcessor/Editor/Views Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,8 @@ protected virtual void DrawDefaultInspector(bool fromInspector = false)
685
685
}
686
686
687
687
//skip if the field is not serializable
688
- if ( ( ! field . IsPublic && field . GetCustomAttribute ( typeof ( SerializeField ) ) == null ) || field . IsNotSerialized )
688
+ bool serializeField = field . GetCustomAttribute ( typeof ( SerializeField ) ) != null ;
689
+ if ( ( ! field . IsPublic && ! serializeField ) || field . IsNotSerialized )
689
690
{
690
691
AddEmptyField ( field , fromInspector ) ;
691
692
continue ;
@@ -695,7 +696,7 @@ protected virtual void DrawDefaultInspector(bool fromInspector = false)
695
696
bool hasInputAttribute = field . GetCustomAttribute ( typeof ( InputAttribute ) ) != null ;
696
697
bool hasInputOrOutputAttribute = hasInputAttribute || field . GetCustomAttribute ( typeof ( OutputAttribute ) ) != null ;
697
698
bool showAsDrawer = ! fromInspector && field . GetCustomAttribute ( typeof ( ShowAsDrawer ) ) != null ;
698
- if ( field . GetCustomAttribute ( typeof ( SerializeField ) ) == null && hasInputOrOutputAttribute && ! showAsDrawer )
699
+ if ( ! serializeField && hasInputOrOutputAttribute && ! showAsDrawer )
699
700
{
700
701
AddEmptyField ( field , fromInspector ) ;
701
702
continue ;
@@ -710,7 +711,7 @@ protected virtual void DrawDefaultInspector(bool fromInspector = false)
710
711
711
712
// Hide the field if we want to display in in the inspector
712
713
var showInInspector = field . GetCustomAttribute < ShowInInspector > ( ) ;
713
- if ( showInInspector != null && ! showInInspector . showInNode && ! fromInspector )
714
+ if ( ! serializeField && showInInspector != null && ! showInInspector . showInNode && ! fromInspector )
714
715
{
715
716
AddEmptyField ( field , fromInspector ) ;
716
717
continue ;
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
10
- Fixed fields with [ Settings] attribute not showing up with inheritance.
11
11
- Fixed selection still active when selecting nodes without inspector fields.
12
12
13
+ ### Changed
14
+ - Fields with both attributes [ SerializeField] and [ ShowInInspector] are now visible in both the node and inspector.
15
+
13
16
## [ 1.3.0]
14
17
15
18
### Added
You can’t perform that action at this time.
0 commit comments