I've got some simple data in objects entities that looks like this:
{"Couch":"45:45:90","Lamp":"1:3:45"}
Then in unity i want to get that data and store it in a list like
class Furniture { string Name; string XandYPos; string YRot; }
Using strings for simplicty now.
so i followed along with this:
https://api.playfab.com/docs/tutorials/entities/getting-started-entities
But then got confused at the bottom when they started to use different code than in the examples previously.
Anyway, I've got this
Dictionary<string, ObjectResult> _entityFileJson = new Dictionary<string, ObjectResult>(); var getRequest = new GetObjectsRequest { Entity = new EntityKey { Id = entityId, Type = entityType } }; PlayFabDataAPI.GetObjects(getRequest, result => { _entityFileJson = result.Objects; }, OnPlayFabError );
Which works and then if i use this to print it out:
foreach(var each in _entityFileJson) { print(each.Value.DataObject.ToString()); }
i get this :
{"Couch":"50:50:100","Lamp":"1:3:45"}
But how do i go from here? i guess its called deserialization but i dont know how.