Hi, I'm very new to playfab. When organizing what data is required for my game, it falls into two main categories:
Player Inventory (a master list of items a player owns. Will likely be a collection of IDs)
Character Data (Level, Xp, current equipment loadout and ability loadout, selected customization options)
My conundrum is that there will be many characters per player. Think of characters NOT as characters (such in the case of skyrim), but rather characters are "operators" such as in Siege, Valorant, Apex Legends, Etc.
How would I write and read my data to Playfab to distinguish character data?
I know playfab has Inventory V2 and Characters... but I do not know how to use these features yet.
For reference, here is my save function.
public void SaveData()
{
var data = new Dictionary<string, object>()
{
{ "Health", 100 },
{ "Mana", 10000 }
};
var dataList = new List<SetObject>()
{
new SetObject()
{
ObjectName = "PlayerData",
DataObject = data
}
};
// A free-tier customer may store up to 3 objects on each entity
PlayFabDataAPI.SetObjects(new SetObjectsRequest()
{
Entity = new EntityKey { Id = NetworkVariables.LoginResultData.EntityToken.Entity.Id, Type = NetworkVariables.LoginResultData.EntityToken.Entity.Type },
Objects = dataList,
}, (setResult) =>
{
Debug.Log(setResult.ProfileVersion);
}, OnSaveLoadError);
}