Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

Retrieve Statistic from Kong API c#

$
0
0
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) { if (Connected) Application.ExternalCall("kongregate.stats.submit", statisticName, value); else 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 Kong through the Kong API. Something like: int upgradeLevel = Application.ExternalCall("kongregate.stats.retrieve", statisticName, value); return upgradeLevel; 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! Thanks

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>