Meta XR Platform SDK (UPM) v71 Reference Guide
Meta XR Platform SDK (UPM) v71 Reference Guide
Select your platform
No SDKs available
No versions available

Core Class

The Core class provides methods for initializing and checking the status of the OculusPlatform SDK. This class is responsible for setting up the necessary components and configurations to enable communication with the OculusPlatform, allowing developers to access features such as Entitlement checks: Entitlements.IsUserEntitledToApplication(). The Core class also provides methods for checking the initialization status of the platform, allowing developers to determine whether the platform is ready for use.

Public Statics

If true, the contents of each request response will be printed using Debug.Log. This can allocate a lot of heap memory, so it should only be used for testing and debugging purposes.
The error message that will be displayed to the user if the platform is not initialized.

Static Member Functions

Returns whether the OculusPlatform SDK has been successfully initialized. True if the platform is initialized, false otherwise.
Asynchronously Initialize Platform SDK. The result will be the type of Models.PlatformInitialize.Result.While the platform is in an initializing state, it's not fully functional. [Requests]: will queue up and run once platform is initialized. For example: Users.GetLoggedInUser() can be called immediately after asynchronous init and once platform is initialized, this request will run [Synchronous Methods]: will return the default value; For example: Users.GetLoggedInUser() will return 0 until platform is fully initialized.Note that during initialization, some features may not be available or may return default values. It's important to check the initialization status before attempting to use certain features or functions. Use Message.IsError to check if the result is an error. Use Message.Type to check the message type. Use Models.PlatformInitialize.Result to get the result of the initialization.
Parameters
appId
The app ID to use for initialization. If null, the app ID will be retrieved from the OculusPlatform Settings.
(BETA) For use on platforms where the Oculus service isn't running, with additional configuration options to pass in.This method allows you to initialize the Platform SDK with custom settings, such as disabling P2P networking.Example usage:var config = new Dictionary<InitConfigOptions, bool>{ [InitConfigOptions.DisableP2pNetworking] = true }; Platform.Core.AsyncInitialize("{access_token}", config);Note that this method is still in beta and may be subject to change. Use at your own risk.
Synchronously Initialize Platform SDK. The result will be the type of Models.PlatformInitialize.Result.While the platform is in an initializing state, it's not fully functional. [Requests]: will queue up and run once platform is initialized. For example: Users.GetLoggedInUser() can be called immediately after synchronous init and once platform is initialized, this request will run [Synchronous Methods]: will return the default value; For example: Users.GetLoggedInUser() will return 0 until platform is fully initialized.Note that during initialization, some features may not be available or may return default values. It's important to check the initialization status before attempting to use certain features or functions. Use Message.IsError to check if the result is an error. Use Message.Type to check the message type. Use Models.PlatformInitialize.Result to get the result of the initialization.
Parameters
appId
The app ID to use for initialization. If null, the app ID will be retrieved from the OculusPlatform Settings.

Object Data for package-static-func

static void ForceInitialized ( )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon