Learn how to use NodeCanvas

Save & Load

A Blackboard can Save and Load its variables state in PlayerPrefs with ease. This means that you can possibly save the whole state of a Behaviour, or use it for any other purposes, like for example creating a save system. All variables of a blackboard are able to be saved and loaded in this specific way (in PlayPrefs), except UnityEngine Object references which are not possible to be saved/loaded into PlayerPrefs.

This can be done in code with these two simple methods.

string Save(string savekey)
Save the blackboard state in PlayerPrefs at the given saveKey. Returns the json string serialized.

bool Load(string saveKey)
Load the blackboard state previously saved in PlayerPrefs of the provided saveKey. Returns whether or not Load was successful.

Alternatively, this can also be done with the included Save Blackboard and Load Blackboard action tasks.

Yes No Suggest edit
11 of 12 users found this section helpful
Suggest Edit