Score: Yes2SDK.score
Score submission, including an encrypted/signed variant for anti-cheat. Supported on CrazyGames and YouTube.
On Poki, GameDistribution, Yandex, and Jest, score submission isn't offered by the platform.
addScore/submitScoreare recorded locally and safe to keep in your code. On YouTube,submitScoreaccepts the encrypted-score string and forwards it as a plain score value.
Methods (Core)
| Signature | Description |
|---|---|
addScore(score: number): void | Add a score value. score must be a valid number. |
submitScore(encryptedScore: string): void | Submit an encrypted/signed score. encryptedScore non-empty. |
isSupported(): boolean | Whether score submission is supported. |
Platform support
| Method | Poki | GameDistribution | CrazyGames | Yandex | YouTube | Jest |
|---|---|---|---|---|---|---|
addScore | None¹ | None¹ | Ready² | None¹ | Ready³ | None¹ |
submitScore | None¹ | None¹ | Ready² | None¹ | Partial⁴ | None¹ |
isSupported | None | None | Ready | None | Ready | None |
¹ Recorded locally; the platform doesn't offer a score API yet.
² CrazyGames sdk.user.addScore/submitScore if the SDK version exposes them (warns otherwise).
³ YouTube ytgame.engagement.sendScore({ value }).
⁴ Parses the string to an int (no encrypted scores on YouTube), then sends; returns early if NaN.
Unity (C#)
Yes2SDK.Yes2SDK.Score.
| Signature | Description |
|---|---|
void AddScore(float score) | |
void SubmitScore(string encryptedScore) | |
bool IsSupported() | Reads the runtime's isSupported() (true on CrazyGames and YouTube). Editor: false. |
Defold (Lua)
| Signature | Description |
|---|---|
yes2sdk.score_add(score) | |
yes2sdk.score_submit(encrypted) | |
yes2sdk.score_is_supported() | Boolean (default false). |