Score: Yes2SDK.score

← Back to overview

Score submission, including an encrypted/signed variant for anti-cheat. Supported on CrazyGames and YouTube.

On Poki, GameDistribution, and Yandex, score submission isn't offered by the platform. addScore/submitScore are recorded locally and safe to keep in your code. On YouTube, submitScore accepts the encrypted-score string and forwards it as a plain score value.


Methods (Core)

SignatureDescription
addScore(score: number): voidAdd a score value. score must be a valid number.
submitScore(encryptedScore: string): voidSubmit an encrypted/signed score. encryptedScore non-empty.
isSupported(): booleanWhether score submission is supported.

Platform support

MethodPokiGameDistributionCrazyGamesYandexYouTube
addScoreNone¹None¹Ready²None¹Ready³
submitScoreNone¹None¹Ready²None¹Partial⁴
isSupportedNoneNoneReadyNoneReady

¹ 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.Score.

SignatureDescription
void AddScore(float score)
void SubmitScore(string encryptedScore)
bool IsSupported()Supported on CrazyGames + Yandex + YouTube per the Unity CHANGELOG. Editor: false.

Defold (Lua)

SignatureDescription
yes2sdk.score_add(score)
yes2sdk.score_submit(encrypted)
yes2sdk.score_is_supported()Boolean (default false).
Pitch your game