Hey,
I get this error when I have the Canvas open during play and destroy the scene of which the FSM owner is part of.
It’s not fatal or anything, just annoying. 😉
NullReferenceException: Object reference not set to an instance of an object
NodeCanvas.Editor.GraphOwnerInspector.OnDestroy () (at Assets/ParadoxNotion/CanvasCore/Framework/Design/Editor/Inspectors/GraphOwnerInspector.cs:42)
Yeah, This is actually a hacky line of code there, which “works” in editor due to how unity objects handle null operators.
I will have fix this in a more proper way.
Thanks 🙂
If it is fake-null (when owner == null is true, but ReferenceEquals(owner, null) isn’t), won’t accessing its members throw with message “The object of type TYPE has been destroyed but you are still trying to access it.”?
What I do there is very hacky, but considering that the hack is kept, then @psykaw‘s code is the “correct” fix. Truth is that the whole OnDestroy method there is not really mandatory, since the object will be cleaned up anyway, but is rather a mini-convenience cleanup, which is not critical at all.
@sugoidev, if ‘ReferenceEquals(owner, null) == false’, then the ‘owner.graph’ will of course not be accessed 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.