Is there a way to measure the amount of memory my PlayerPrefs is taking up?

Just created this cool way of saving complex items as strings in a PlayerPref.setString(“Inventory”) but now I am curious if I am taking up a lot of memory or not. Are there any easy ways to check the memory size being used by PlayerPrefs? I know we have a limit of 1mb (WebPlayer) so I would just like to be precautions.

I asked this a while ago.

The best option mentioned was some sort of wrapper on player prefs to check it’s size.

Thank you for that. I am aware that PlayerPref should be used for little things, but why is everyone saying use a server? Wouldn’t that require buying a server first? I’m only willing to continue this hobby as long as it remains free (For now). I’ve looked into pricing servers before and it just seems annoying how they want me to track a lot of information and pay them according. Do you by chance have any suggestions for me?

There are back ends like parse that have a free tier. Works well enough for me as a hobbyist.

2 Likes

Thi

looks great, thank you very much!

this can calculate in Byte right?