In order for this project to be functional in editor and on device there is some initial setup that needs to be done.
To run the project and use the platform services we need to create an application on the Meta Quest Developer Center.
To run on device you will need a Quest application, and to run in editor you will need a Rift application. The following sections will describe the configuration required for the application to run.
To use the features from the Platform we need to request which kind of data is required for the application. This can be found in the Data Use Checkup section of the application.
And configure the required Data Usage:
- User Id: Avatars, Oculus Username
- User Profile: Avatars, Oculus Username
- Avatars: Avatars
Once completed you will need to submit the request, click the submit button at the bottom.
We then need to the set the application ID in our project in Unity.
The identifier (App ID) can be found in the API section.
Then it needs to be placed in the Assets/Resources/OculusPlatformSettings.asset, which can be accessed in the menubar via Oculus > Platform > Edit Settings.
To get the sample working, you will need to configure Photon with your own account and applications. The Photon base plan is free.
- Visit photonengine.com and create an account
- From your Photon dashboard, click "Create A New App"
- We will create 2 apps, "Fusion" and "Voice"
- First fill out the form making sure to set type to "Photon Fusion". Then click Create.
- Select "Fusion 1" in the Select SDK Version item.
- Second fill out the form making sure to set type to "Photon Voice". Then click Create.
Your new app will now show on your Photon dashboard. Click the App ID to reveal the full string and copy the value for each app.
Open your unity project and paste your Fusion App ID and Voice App ID in Assets/Photon/Fusion/Resources/PhotonAppSettings, which can be accessed in the menubar via Fusion > RealtimeSettings.
The Photon Realtime transport should now work. You can check the dashboard in your Photon account to verify there is network traffic.
When you first launch the application a permission popup will ask to share point cloud, you must say yes if you want to use colocation. If you answered no, from this application or another application using shared point cloud data, you can go on device to Settings > Privacy > Device Permissions > Share Point Cloud Data. It must be enabled.
The application should also have Spatial Data permission enabled, this can be verified on device here: Settings -> Apps -> Permissions -> Spatial Data
In order to have colocation working using the shared spatial anchors, you will first need to upload an initial build to a release channel. For instructions you can go to the developer center. Then to be able to test with other users you will need to add them to the channel, more information in the Add Users to Release Channel topic.
Once the initial build is uploaded you will be able to use any development build with the same application Id, no need to upload every build to test local changes.