Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Example usage

The following example highlights how a developer might use the VIVEPORT Arcade Session API in their title.

Make sure you have a VIVEPORT ID and Key for your title before trying to implement any of the API functions.

Important : You will need credentials and configuration for third-party server authentication, such as using your own server for multiplayer or networking. For details, please see authentication with third-party servers .

  1. Call the Top Level API using Viveport.Api.Init to initialize the VIVEPORT SDK. For Unity developers, this is typically called as Monobehavior Start() .
  2. Call Session.IsReady() to initialize the Arcade Session API once Viveport.Api.Init has completed. For Arcade environments, it is strongly recommended to call this as soon as the title launches.
  3. Call Start() to start a session. When completed, listener.OnStartSuccess() will retrieve the app ID as string pchAppID and a unique session GUID string pchGuid . This might be called after the player has selected a character or configured a loadout.
  4. Call Stop() to end a session. When completed, listener.OnStopSuccess() will retrieve the app ID as string pchAppID and a unique session GUID string pchGuid which should match that of listener.OnStartSuccess() . This might be called after the player has completed a single game, but could also be called at the end of a “best out of three” or similar setup.
  5. Call Viveport.Api.Shutdown to release VIVEPORT SDK resources when no longer needed. In Unity, this is typically either in MonoBehavior OnDestroy() or before Application.Quit() .

Important : Be sure to call Session.IsReady() at title launch, as well as Start() and Stop() at the appropriate times to avoid revenue loss.