File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,16 @@ public void PullData()
310
310
// Only one input connection is handled by this code, if you want to
311
311
// take multiple inputs, you must create a custom input function see CustomPortsNode.cs
312
312
if ( edges . Count > 0 )
313
- fieldInfo . SetValue ( fieldOwner , edges . First ( ) . passThroughBuffer ) ;
313
+ {
314
+ var passThroughObject = edges . First ( ) . passThroughBuffer ;
315
+
316
+ // We do an extra convertion step in case the buffer output is not compatible with the input port
317
+ if ( passThroughObject != null )
318
+ if ( TypeAdapter . AreAssignable ( fieldInfo . FieldType , passThroughObject . GetType ( ) ) )
319
+ passThroughObject = TypeAdapter . Convert ( passThroughObject , fieldInfo . FieldType ) ;
320
+
321
+ fieldInfo . SetValue ( fieldOwner , passThroughObject ) ;
322
+ }
314
323
}
315
324
}
316
325
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 1.2.1]
8
+
9
+ ### Fixed
10
+ - Fixed relay node not applying custom conversions when needed
11
+
7
12
## [ 1.2.0]
8
13
9
14
### Added
You can’t perform that action at this time.
0 commit comments