Reply To: Share Blackboard across Agents with same Behaviour Tree

Forums 💬 NodeCanvas 🗨️ General Discussion Share Blackboard across Agents with same Behaviour Tree Reply To: Share Blackboard across Agents with same Behaviour Tree

#13821
Gavalakis
Keymaster

    Hello,

    Hmm. There are two possible solutions that I can think of for this.

    1) You can use the Blackboard API, to set the variables by code directly. For example:

    2) You could save a Blackboard variables to a serialized json string and store it somewhere, then deserialize the target blackboard you want, using that json. Some example code:

    You could of course also create some editor utility to save the json string to a file in editor only, like for example:

    Then in runtime you would need to of course have a reference to that saved TextAsset file and deserialize the blackboard from it’s contents. Once again, for example:

    Let me know if any of the above solutions works for you.

    Thanks!