My team and I are running into a bug where our node parameter getting set to null at (what seems like) random moments. In my experience when the reference is lost all nodes of this type have this value set to null, but my team was reporting instances where only one subtree lost it’s references too.
I am having very hard time pinning down the cause so I will try to give all relevant context
• The tree is NOT scene bound, and it references only assets (prefabs)
• The configuration I am losing is a custom node (source code below)
• These nodes are in subtrees
• This is not an issue of source control, I pulled down the same branch on two computers, one had null for references while the other had correct values. On the machine with null references, I deleted the branch and then re-pulled, it started working again.
Here is the code for my custom node, it’s the creepPrefab field that keeps getting lost, the creepSpawner field gets set dynamically from blackboard.
I know this is not a lot to go off of, I just have hard time pinning it down myself. Has anyone experienced something like this themselves?
Hello there,
Thank you for the info. Can you please also let me know what NodeCanvas as well as Unity versions are you using so that I can make some tests and try to reproduce here on the exact same versions?
Hello again.
Unfortunately I wasn’t really able to reproduce this in my end yet 🙁
Just to confirm, are you using Unity Asset Database v1, or the new v2?
Do you only have this problem with this specific custom node and prefab reference, or are there more similar happenings elsewhere as well?
What we are running into is behaving exactly like what this guy described. #15073
Our fix right is the same too, just move some nodes around, save, reset on git. Frankly annoying, but not a big deal, and I was not too worried about it until this popped up in a built game, twice so far.
Sorry I don’t have reproduction. I just spent 20 minutes changing around things and switching branches, can’t get it to happen.
In that post you suggested code change to work around this issue. Is that still a good idea? We have moved ahead in version since then.
P.S. linking to other threads seems to be a broken feature of this forum. Even a simple link with URL does not seem to work… For me at least. Might be my side.
Did this happen at all while using the previous version of Unity that you were using before?
I would advise to please give the solution posted on that other thread a try. It is a very safe change, however and as always, I would advise making a backup before that change to be 100% on the safe side.
Let me know. Thank you!
( PS: I will take a look at the forum linking problem )