LogMessages
: bool |
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.
Signature
bool Oculus.Platform.Core.LogMessages |
PlatformUninitializedError
: string |
The error message that will be displayed to the user if the platform is not initialized.
Signature
string Oculus.Platform.Core.PlatformUninitializedError |
AsyncInitialize
(
appId
)
|
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.
Signature
static Request<Models.PlatformInitialize> Oculus.Platform.Core.AsyncInitialize(string appId=null) Parameters Returns Request< Models.PlatformInitialize > |
AsyncInitialize
(
accessToken
, initConfigOptions
, appId
)
|
(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.
Signature
static Request<Models.PlatformInitialize> Oculus.Platform.Core.AsyncInitialize(string accessToken, Dictionary< InitConfigOptions, bool > initConfigOptions, string appId=null) Parameters Returns Request< Models.PlatformInitialize > |
Initialize
(
appId
)
|
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.
Signature
static void Oculus.Platform.Core.Initialize(string appId=null) Parameters Returns void |
IsInitialized
()
|
ForceInitialized
()
|
Signature
static void Oculus.Platform.Core.ForceInitialized() Returns void |