Game.PSI.PlatformSupport
Assembly:
Namespace: Game.PSI
Type: static class
Base:
Summary:
Utility holder for creating platform service integration instances used by the game (Discord rich presence and Microsoft GDK). It exposes factory delegates that instantiate integration implementations. The class stores a private constant Discord client ID and provides two public readonly Func
Fields
-
private const long kDiscordClientId
A private constant long value (1125009418476605441) containing the Discord application/client ID used by the DiscordRichPresence factory. -
public static readonly Func<IPlatformServiceIntegration> kCreateDiscordRichPresence
Factory delegate that, when invoked, returns a new DiscordRichPresence initialized with the Discord client ID (currently hard-coded as 1125009418476605441L). Each invocation creates a new DiscordRichPresence instance. -
public static readonly Func<IPlatformServiceIntegration> kCreateGDKPlatform
Factory delegate that, when invoked, returns a new GdkPlatform initialized with the hard-coded GDK product ID "00000000-0000-0000-0000-000063723bae". Each invocation creates a new GdkPlatform instance.
Properties
This static class declares no properties.
Constructors
public PlatformSupport()
No instance constructors — the class is static and cannot be instantiated.
Methods
This class does not declare instance or static methods beyond the factory delegates (fields) themselves.
Usage Example
// Create a Discord integration instance
IPlatformServiceIntegration discordIntegration = PlatformSupport.kCreateDiscordRichPresence();
// Create a GDK integration instance
IPlatformServiceIntegration gdkIntegration = PlatformSupport.kCreateGDKPlatform();
// Example usage: check for null and use the interface methods as appropriate
if (discordIntegration != null)
{
// Use the integration via the IPlatformServiceIntegration interface
// e.g. discordIntegration.Initialize(); (interface methods may vary)
}
Notes:
- Both factories create new instances on each invocation.
- The Discord client ID and the GDK product ID are hard-coded in this class. If you need to use different IDs (for testing or a custom integration), replace or override these factories with your own Func