Skip to content

Latest commit

 

History

History
135 lines (100 loc) · 5.81 KB

Configuration.md

File metadata and controls

135 lines (100 loc) · 5.81 KB

Project Configuration

In order for this project to be functional in editor and on device there is some initial setup that needs to be done.

Application Configuration

In order 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.

Data Use Checkup

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.

data use checkup

And configure the required Data Usage:

  • User Id: Avatars, Destinations, Multiplayer, Oculus Username, Friends Invites, User Invite Others
  • User Profile: Avatars
  • Avatars: Avatars
  • Deep Linking: Destinations
  • Friends: Multiplayer
  • Blocked Users: Other - we use the Blocking API
  • Invites: Multiplayer, Friends Invite, User Invite Others

Destinations

This application uses Destination configuration to enable users to invite friends in the same arenas and launch the application together.

First we need to open the Destinations from the Platform Services:

Platform Services Destinations

Then we need to setup the different destinations.

Destinations

Main Menu

First off we have the MainMenu destination, which is a destination unique to the user where no other player can join them. It is setup like this:

Destination Main Menu

You will notice that the deeplink type is set to DISABLED, which prevents users from joining this destination together.

Arenas

Then we have different Arenas for each region:

Destination NA

This is an example for the North American region. The deeplink type is set to ENABLE and we use the data of the deeplink to specify the Photon region to use. The format of the deeplink message is specific to our project. You can also note that the Group Launch capacity is set. As we have a maximum of 6 players in an Arena, the maximum is set to 6. (Note that the maximum value must be set to enable group launch.)

Here is a table for destinations settings:

Destination API Name Deeplink Message
Main Menu MainMenu N/A
North America Arena {“Region”:”usw”}
South America ArenaSA {“Region”:”sa”}
Japan ArenaJP {“Region”:”jp”}
Europe ArenaEU {“Region”:”eu”}
Australia ArenaAU {“Region”:”au”}
Asia ArenaAsia {“Region”:”asia”}

Set the Application ID

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.

Application API

Then it needs to be placed in the Assets/Resources/OculusPlatformSettings.asset

Oculus Platform Settings Menu

Oculus Platform Settings

Photon Configuration

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, "Realtime" and "Voice"
  • First fill out the form making sure to set type to “Photon Realtime”. Then click Create.
  • 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 Realtime App ID in Assets/Photon/Resources/PhotonAppSettings.

Photon App Settings Location

Photon App Settings

Set the Voice App Id on the VoiceRecorder prefab:

Photon Voice Recorder Location

Photon Voice Settings

Additional Setup for Realtime

In the case of our project we wanted players to be able to play in different regions with reduced latency, therefore we used the different regions that Photon provided. But in order to make the project simpler we limited the number of regions we would use. To do so we need to whitelist which regions are used by the application.

Photon Whitelist

The Photon Realtime transport should now work. You can check the dashboard in your Photon account to verify there is network traffic.