Allow ports to connect across types
Read time 1 minuteLast updated 21 days ago
To allow connecting ports of different types, for example an port to a port:
intfloat- Override the method .
Graph.IsConnectionAllowed() - Check the output's data type with .
output.DataType == typeof(int) - Check the input's data type with .
input.DataType == typeof(float) - Return true when conditions match.
Refer to the full example in the IsConnectionAllowed API reference.