Getting Started

Are you stuck on where to begin? Follow this guide that will send you through the setup process FAST!

Welcome to the MirrorVR Setup! It is a long process, but it's easy if you follow along!

Dependencies

  • Newtonsoft.Json

    • Make sure you have this installed. To install, go to Window > Package Manager, then hit the + icon in the top left, then Add package by name..., then type in com.unity.nuget.newtonsoft-json, and hit Add or Install.

  • Unity Version

    • The recommended Unity version for MirrorVR is Unity 6+, but you should be able to use this package with no issues if you are on Unity 2021.3.35f1+.

  • Universal Render Pipeline

    • It is recommended to have URP installed before installing this package. It's not required, it's just a suggestion.

Installation

1

First, download the latest version of Mirror and put it into your game. Then after Mirror is installed in your project, get the latest MirrorVR package and put it in your game.

2

Go to Assets/MirrorVR in your Unity Project. That is where the package is located. Now go inside the Prefabs folder, and drag the Network Manager prefab into your scene.

3

Now open up the Network Manager object you just dragged into the scene. Assign the Player Transforms to their values. Skip API Keys and Encryption Key for now, we will cover those in a bit.

Go right to the Settings section. Configure then how you want them. If you need details on what some settings do, see Mirror VR Manager.

4

Now to set up Epic Online Services. If you are using the Dedicated Servers or PlayFab (coming soon) features, you still need to use Epic, as it provides an awesome player management backend to make your game better. Head right over to the Epic Games Developer Portal, Sign in, and create an organization if you don't have one already.

5

Once you have made your organization, hit the Create Product button. Name your product. It should be your game name. Once done, hit the create button, then wait a bit.

6

Once your product has been created and it's done loading, click on it. On the left-hand side of your screen, click on the Product Settings tab.

Now click on the Clients tab.

7

Scroll towards the bottom, where it says Client policies. Click the blue Add new client policy button.

Name your policy whatever you want, and set Policy Type to be Peer2Peer.

At the bottom right of your screen, press the blue Add new client policy button.

8

Now scroll up a little to the Clients section. Click the Add new client button.

Client Name can be anything. On client policy, select the one we just created. We can skip IP allow list and Redirect URL, as they aren't needed for our case.

On the bottom right of your screen, click the Add new client button.

9

Next, go to the Epic Account Services tab.

Hit the Create Application button.

10

We don't need to do anything in the Brand Settings tab, so go up to the top right of your screen, and select the Permissions tab.

Enable all permissions.

Hit Save Changes at the bottom right.

11

Head over to the Linked Clients tab.

Select the client we made, and then hit Save Changes.

Now in the top left, hit the Back to Epic Account Services button.

12

Now go back to the Product Settings tab.

Under SDK Download & Credentials, scroll to the bottom to get your API Keys.

13

Now go back to MirrorVRManager and put these credentials in their fields.

While we are here, let's set the Encryption Key.

The Encryption Key will be used to read and write to Title Storage (10 free GB per app) and Player Data Storage (400 MB or 1000 files per player). Make sure you store it somewhere safe so you can use it later.

Go to this website to generate a 64 byte hexadecimal string we can use as the encryption key. Copy it, put it into the Encryption Key field in MirrorVRManager, and you're all set!

14

And basic setup is done! See below for next steps.

Last updated