Reply To: [Bug] Graph OnEnable() fires on Load, causes errors

NodeCanvas Forums Support [Bug] Graph OnEnable() fires on Load, causes errors Reply To: [Bug] Graph OnEnable() fires on Load, causes errors


Hello again,

Within the Unity Editor, the Graph Console window will allow to point you to the graph-node that causes the exception, however if the exception only occurs in build then it is not possible. With that said you could add a debug log to help pinpoint at least the name of the object failing (in this case the graph’s name). Please open up “Logger.cs” and change the “ForwardToUnity” method to be like this:

This should log the name of the graph right after the exception. Please let me know if that helps.

Having said all the above, this exception is usually because something used (serialized) in NodeCanvas has been code-stripped away (this is where the link.xml file comes into play to avoid such code-stripping). Your method of adding all scripts should have fixed this, however if you are using some type from a DLL library, Unity Package Library, or something that is not defined in a “monoscript”, then it may be getting code-stripped away. Can you please confirm whether there is a possibility of a type being used in NodeCanvas that is from some non- “monoscript” library like a DLL, or maybe even from with a “plugins” folder and there is the possibility that such a type is not included in the Preferred Types Editor (and thus possibly being code-stripped away)?

Thank you!

Join us on Discord: