BlackboardEvents sent by Save and Load
v4.0
// topic will always be "Save and Load"
// gameId will always be "Game Data"
// status will indicate which save or load step triggered the event
// obj will have the SaveId being managed, but may be null in some cases
// EVENTS SENT (will be in the status value of the BlackboardEvent)
// "Save Start" [obj = the SaveGameId being saved]
// "Save End" [obj = the SaveGameId being saved]
// "Load Start" [obj = the SaveGameId being loaded]
// "Load End" [obj = the SaveGameId being loaded]
// Examples on how to listen for BlackboardEvents from the Save and Load module
public override void ReceiveEvent(BlackboardEvent blackboardEvent)
{
// Save Start and Save End events do not include any data in
// the obj value, so they are ignored here.
if (blackboardEvent.topic == "Save and Load"
&& blackboardEvent.gameId == "Game Data"
&& blackboardEvent.status == "Save Start")
{
PreSaveActions();
}
if (blackboardEvent.topic == "Save and Load"
&& blackboardEvent.gameId == "Game Data"
&& blackboardEvent.status == "Save End")
{
PostSaveActions();
}
}Last updated