// Start is called before the first frame update void Start() { UpdateConsole("Init Oculus Platform SDK..."); Core.AsyncInitialize().OnComplete(message => { if (message.IsError) { // Init failed, nothing will work UpdateConsole(message.GetError().Message); } else { /** * Get the deeplink message when the app starts up */ UpdateConsole("Init complete!\n" + GetAppLaunchDetails()); /** * Get and cache the Logged in User ID for future queries */ Users.GetLoggedInUser().OnComplete(OnLoggedInUser); /** * Get the list of destinations defined for this app from the developer portal */ RichPresence.GetDestinations().OnComplete(OnGetDestinations); /** * Listen for future deeplink message changes that might come in */ ApplicationLifecycle.SetLaunchIntentChangedNotificationCallback(OnLaunchIntentChangeNotif); } }); }
// Start is called before the first frame update void Start() { UpdateConsole("Init Oculus Platform SDK..."); Core.AsyncInitialize().OnComplete(message => { if (message.IsError) { // Init failed, nothing will work UpdateConsole(message.GetError().Message); } else { UpdateConsole("Init complete!"); /** * Get and cache the Logged in User ID for future queries */ Users.GetLoggedInUser().OnComplete(OnLoggedInUser); /** * Get the list of destinations defined for this app from the developer portal */ RichPresence.GetDestinations().OnComplete(OnGetDestinations); /** * Listen for future join intents that might come in */ GroupPresence.SetJoinIntentReceivedNotificationCallback(OnJoinIntentChangeNotif); /** * Listen for future leave that might come in */ GroupPresence.SetLeaveIntentReceivedNotificationCallback(OnLeaveIntentChangeNotif); /** * Listen for the list of users that the current users have invitted */ GroupPresence.SetInvitationsSentNotificationCallback(OnInviteSentNotif); } }); }