EVG
Member
Sorry for this question, maybe I don’t understand the principle of working with currency at all, but how can I get the character’s currency regardless of the scene?
For example:
There is a character in the "Game" scene, during the game he receives and accumulates currency. How can I now use this accumulated currency in another "Menu" scene? For example, to buy weapons or something else.
I have tried saving and loading values with your code:
Everything works well for the current scene. But how can I get the currency in another scene from the same owner, but without him?
For example:
There is a character in the "Game" scene, during the game he receives and accumulates currency. How can I now use this accumulated currency in another "Menu" scene? For example, to buy weapons or something else.
I have tried saving and loading values with your code:
C#:
public object RecordData()
{
SaveSystemManager.Save(saveSlot, false);
var saveDataInfo = SaveSystemManager.GetCurrentSaveDataInfo();
var saveData = saveDataInfo.Data;
return saveData;
}
public void ApplyData(object data)
{
if (data == null) return;
var saveData = data as SaveData;
SaveSystemManager.Load(saveSlot, saveData);
}