logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AchievementPlatformScriptingDefines

    The scripting defines that switch each storefront gateway from its inert template to the real SDK call sequence.

    Inheritance
    object
    AchievementPlatformScriptingDefines
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Achievements.Infrastructure.Platforms
    Assembly: Serenity.UnityAchievements.Infrastructure.dll
    Syntax
    public static class AchievementPlatformScriptingDefines
    Remarks

    Written once here because the same four strings are needed in three places that must not disagree: the #if that compiles a gateway, the warning an inert gateway prints, and the SDK doctor that offers to set it. A typo in any one of them produces a project where the doctor reports "ready" and the gateway stays inert, with nothing to point at.

    Two of the four are not ours to set. UNITY_GAMECORE and UNITY_PS5 are Unity's own platform defines, present only when that platform module is installed and selected — writing them by hand produces a project that claims a console it cannot build for. The doctor knows this and never offers to add them; see AchievementSdkManifest.IsDefineManagedByUnity.

    Fields

    Epic

    Enables the Epic Online Services branch. Reserved ahead of the SDK's redistribution sign-off.

    Declaration
    public const string Epic = "SERENITY_ACHIEVEMENTS_EOS"
    Field Value
    Type Description
    string

    PlayStation

    Unity's own define for a PlayStation 5 build target. Never set by hand.

    Declaration
    public const string PlayStation = "UNITY_PS5"
    Field Value
    Type Description
    string
    Remarks

    PS5 only. Serenity's minimum editor is Unity 6, whose PlayStation support is the PS5 module; a PS4 title runs on an editor line this package does not target, so UNITY_PS4 is deliberately not a second branch to keep in step.

    Steam

    Enables the real Steamworks.NET call sequence in SteamAchievementGateway.

    Declaration
    public const string Steam = "SERENITY_ACHIEVEMENTS_STEAM"
    Field Value
    Type Description
    string

    Xbox

    Unity's own define for a Microsoft GDK build target. Never set by hand.

    Declaration
    public const string Xbox = "UNITY_GAMECORE"
    Field Value
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved