More real world application problems 😉 We’re using Global Blackboards to ease communication of complex systems. Now, those systems (quests) are actually pretty short-lived, meaning, they come into existence, then the player dabbles around for some time, then the quest is destroyed. After that, the player has the choice to start the same quest again, with different attributes.
Now the quest basically is a prefab that contains global blackboards to let all the individual quest parts (dialogs, FSMs, …) communicate. This prefab is instantiated and then destroyed, repeatedly. Now I have observed that variables bound to global blackboards on FSMs or Dialogues do not bind to the “next” global blackboard, but they somehow still keep references to the variables in the long since destroyed global blackboard.
I attached a reproduction case. When the scene is started, it will repeatedly instantiate and destroy a global blackboard from a prefab, while incrementing a var on the blackboard while it exists. After the first iteration, one can observe that the variable on the blackboard does not get incremented anymore (stays at the initial value of 0 instead of switching to 1).
Bump 🙂 We’re still suffering from this issue. I could temporarily work around it to unblock ourselves but now it just gets very tedious to have lots of global blackboards for all sorts of quests. The missing of a better approach to share data between FSMs/BTs/DialogueTrees requires us to use global BBs to share game state. But it can’t be properly done in a modular way with this bug.
Sorry. I really missed your first post.
The thing is that a GlobalBlackboard data is stored within the instance. Thus if you destroy the GlobalBlackboard and instantiate a new instance, the variables will naturally start from the initial values again.
The GlobalBlackboards are mostly meant to be used for Scene Global variables without instantiating/destroying them.
To be honest I am not very happy with how GlobalBlackboards work right now and I am thinking of moving them to being entirely Assets (in which case what you are after will also work without instantiating/destroying).
I am not entirely sure in what context this is taking place, but I presume once the ability to map local graph variables from parent graph variables is there (similar to Dialogues) this new ability will be a better solution for your case?
Please let me know your thoughts.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.