Example usage
The following example highlights how a developer might use the VIVEPORT DLC 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.
-
Call the top level API using
Viveport.Api.Init
to initialize the VIVEPORT SDK. For Unity developers, this is typically called as MonobehaviorStart()
. -
Call
Viveport.DLC.IsDlcReady()
to initialize the VIVEPORT DLC API. -
Do any of the following:
-
Call
Viveport.DLC.GetCount()
to check the total number DLC releases for that title. -
Call
GetIsAvailable()
to determine if a given piece of DLC has been purchased on the end-user account.
-
Call
-
Call
Viveport.Api.Shutdown
to release VIVEPORT SDK resources when no longer needed. In Unity, this is typically either in MonoBehaviorOnDestroy()
or beforeApplication.Quit()
.
Note:
When submitting DLC, if you don’t have additional binaries, include a dummy text file larger than 0KB as a ZIP file.
When submitting DLC, if you don’t have additional binaries, include a dummy text file larger than 0KB as a ZIP file.
Note:
DLC is not supported on titles that are in beta testing stage.
DLC is not supported on titles that are in beta testing stage.