What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
I currently have the Kong API implemented and working and use this method to submit a statistic:
public static void Submit(string statisticName, int value)
Application.ExternalCall("kongregate.stats.submit", statisticName, value);
Debug.LogWarning("You are attempting to submit a statistic without being connected to Kongregate's API. Connect first, then submit.");
What I can't figure out is how to retrieve a statistic from through the Kong API.
int upgradeLevel = Application.ExternalCall("kongregate.stats.retrieve", statisticName, value);
So that after retrieving the value of the statistic I can assign it to a variable that will be used by other scripts in the game(showing what upgrade level you have in UI, affecting behaviour with an upgrade level modifier int etc.)
I would like to write a static retrieve method like the submit method but instead of being passed a value to submit, it gets a value and returns it.
I am using Unity and build to WebGL.
I have googled and read through a lot of documentation but am a bit at a loss as to how to go about it.
Any help is appreciated!
Kong stats API is write-only. You are not allowed to read from it.
The shared-level API is both directions, but that's no good for "statistics data" as you can't prevent people from picking and choosing which data *to* load.
Okay great thanks for the feedback guys. I just hoped there may be an easier way to save player data without using PlayerPrefs in Unity as in their documentation it states that the data is automatically deleted if not used for a time. So if you don't play the game for a long time your save gets deleted. Serialization works great for desktop versions but unfortunately wont work in a web enviroment.
> *Originally posted by **[SandmanZA](/forums/4/topics/720604?page=1#11098201)**:*
> Okay great thanks for the feedback guys. I just hoped there may be an easier way to save player data without using PlayerPrefs in Unity as in their documentation it states that the data is automatically deleted if not used for a time. So if you don't play the game for a long time your save gets deleted. Serialization works great for desktop versions but unfortunately wont work in a web enviroment.
So I'm using Unity to create my WebGL games too and I'm curious about your statement that PlayerPrefs will be automatically deleted if not used after a long period of time. I've searched the documentation and can't find any information on this. Where did you find this info?
That info is slightly incorrect. PlayerPrefs are essentially cookies in web builds (more accurately, saved with your browser's IndexedDB API), so if the user clears their cookies or their cache their save gets deleted. Some programs automatically delete this info after a certain amount of time. In desktop builds this data is stored in more persistent locations since the security restrictions are lifted.
If you don't need online saving then PlayerPrefs will serve you just fine. If you need data to persist between different computers you will need to use a third party system.