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
2k stars 415 forks source link

Fixed Export Xml when the node have String type #191

Closed AtheosCode closed 3 years ago

AtheosCode commented 3 years ago

the data type is string == is wrong please use Equals or overloaded operator

AtheosCode commented 3 years ago

Other places may have the same error, expect to check

Seneral commented 3 years ago

True that would result in multiple references with the same value, kind of defeating the purpose of storing references. ReferenceObject is intended to run only on objects where keeping the references between variables is important. Since it is unlikely people will store the same large text in multiple variables, I would probably change the string type to be embedded in the serialized node alltogether, like value type variables, which makes it easier to edit. Also I'm not sure the the use of Equal is intended in all cases, since it will actually recreate the references on import. Which means a variable you expected to be private to the node is suddenly shared between nodes that, by chance, had the same values. Hope that makes sense. Thanks for pointing that out though, if there are no objections to that reasoning I'd go with a small change to this line instead.