Game Jolt Unity API
v2.5.8
|
You are probably missing the EventSystem in your scene. Manually add one to your scene (GameObject > UI > EventSystem
) or make sure to use the API v2.0.1 or more so it is automatically added when you add the API to your scene (GameObject > GameJolt API Manager
).
You should sign in with your game token, not your password (your password is only used to log into GameJolt). You can find your token on GameJolt by clicking on your user picture then selecting Game Token
.
You are probably unlocking the trophy in the Update
loop, therefore triggering it on every frame. See this issue for more details.
Make sure you use the API v2.1.0
or higher and Unity 5.0.1
or higher. There is a bug in previous versions.
You can't use floats
directly as scores are saved as integer on the server. However, if you have a fixed number of decimals, you can convert your float
to int
before saving it (and use the score display string to still show a float
).
For example:
The sign-in methods accepts 2 callbacks, the first one returns as soon as the user is logged in, however some attributes (e.g. user.AvatarURL
) will not be populated yet. The second one returns once all the users attributes have been populated (minus user.Avatar
for which you have to manually call user.DownloadAvatar()
). Make sure to subscribe to the second one. See the tutorial for code examples.