question

pleasehelpme avatar image
pleasehelpme asked

Call on a float variable on level load. Which API Function do I use?

Hello,

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pleasehelpme avatar image pleasehelpme commented ·

I accidentally pressed Enter and it posted. I wanted to ask which API and function of Playfab I would use to define a Level load in a Float. In which that if the float call is a 1.0 from Playfab>Unity, Unity would be able to receive the 1.0 Variable and load the Level from the beginning.

Then when the player reaches Checkpoint X/Y/Z, I want the float to update Unity>Playfab as 1.1/1.2/1.3/etc. so the player can start at Checkpoint X/Y/Z when the player resumes the Level again after closing the application.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

The simplest thing would be to store it in an Entity Object, which is JSON. So, you'd just store the KVP of that data in your object, and load it from there. You could also use the original user data model for this, but I'd recommend packing more things into the value, in that case. Lots of little KVPs in the older data system aren't very efficient.

https://api.playfab.com/docs/tutorials#entities

https://api.playfab.com/docs/tutorials/landing-players/using-player-data

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.