i have a Prefab in Assets folder, this prefab has a blackboard, and the blackboard has a variable to linked this prefab’s child gameObject.
and when i instantiate it, in hierarchy the blackboard variable still linked to Assets folder Prefab..
Hello,
Wow… that’s a critical bug. Thanks!
To fix this, please open up Blackboard.cs and in method ‘OnBeforeSerialize’, add at the very first line of the method (above #if UNITY_EDITOR) this hasDeserialized = false;
Also, please do exactly the same in Graph.cs in the first line of it’s ‘OnBeforeSerialize’
I noticed it is not about the blackboard, but the graph’s variables.
1) create a new game object in scene call it “root”
2) create a child of that game object
2) add fsm owner component to the “root” object
3) add state with action, “Set visibility”
4) In the action “Set Visibiity” set the target to the child object
5) make the “root” gameobject -> prefab
6) Instantiate that prefab by code
7) notice the “Set Visibility” node is chaning the prefab, and not the instance child.
I followed your steps exactly and everything works as expected. The “Instantiated” child is affected and not the prefab child.
So, only one question remains 🙂
What exact version of NodeCanvas and Unity are you using just to confirm?
Thanks.
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.