Pico Unity Platform SDK
Pico.Platform.CoreService Class Reference

Static Public Member Functions

static bool IsInitialized ()
 Gets whether the Platform SDK has been initialized. More...
 
static Task< PlatformInitializeResultAsyncInitialize (string appId=null)
 Initializes the Platform SDK asynchronously. More...
 
static void Initialize (string appId=null)
 Initializes the Platform SDK synchronously. More...
 
static Task< GameInitializeResultGameInitialize (string accessToken)
 Initializes game-related modules, such as room, matchmaking, and network. More...
 
static bool GameUninitialize ()
 Uninitializes game-related modules, such as room, matchmaking, and network. More...
 

Static Public Attributes

static bool Initialized = false
 
static string UninitializedError = "Platform SDK has not been initialized!"
 

Member Function Documentation

◆ AsyncInitialize()

static Task<PlatformInitializeResult> Pico.Platform.CoreService.AsyncInitialize ( string  appId = null)
static

Initializes the Platform SDK asynchronously.

Parameters
appIdThe app ID for the Platform SDK. If not provided, Unity editor configuration will be applied.
Returns
The initialization result.
Exceptions
UnityExceptionIf the input app ID is null or empty or if the initialization fails, this exception will be thrown.
NotImplementedExceptionIf the current platform is not supported, this exception will be thrown.

◆ GameInitialize()

static Task<GameInitializeResult> Pico.Platform.CoreService.GameInitialize ( string  accessToken)
static

Initializes game-related modules, such as room, matchmaking, and network.

Parameters
accessTokenThe access token of Platform SDK. You can get the access token by calling UserService.GetAccessToken().

◆ GameUninitialize()

static bool Pico.Platform.CoreService.GameUninitialize ( )
static

Uninitializes game-related modules, such as room, matchmaking, and network.

Returns
  • true: success
  • false: failure

◆ Initialize()

static void Pico.Platform.CoreService.Initialize ( string  appId = null)
static

Initializes the Platform SDK synchronously.

Parameters
appIdThe app ID for the Platform SDK. If not provided, Unity editor configuration will be applied.
Exceptions
NotImplementedExceptionIf the current platform is not supported, this exception will be thrown.
UnityExceptionIf the initialization fails, this exception will be thrown.

◆ IsInitialized()

static bool Pico.Platform.CoreService.IsInitialized ( )
static

Gets whether the Platform SDK has been initialized.

Returns
  • true: initialized
  • false: not initialized

Member Data Documentation

◆ Initialized

bool Pico.Platform.CoreService.Initialized = false
static

◆ UninitializedError

string Pico.Platform.CoreService.UninitializedError = "Platform SDK has not been initialized!"
static

The documentation for this class was generated from the following file: