Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Add subclass acceptance for Connections #73

Closed nicoell closed 8 years ago

nicoell commented 8 years ago

Allows connection of two Nodes if the Type of the output Connection is a subclass of the Type of the input Connection.

I needed this feature to allow Connections of different Types that inherit from the same abstract class.

Seneral commented 8 years ago

I did something like this in the develop branch, a little bit more general though: typeData.Type.IsAssignableFrom (output.typeData.Type) will account for all cases that may allow connection. But until I find time to merge these commits into master this will suffice:) Thanks!