Unity SocialStarter Sample Scene

The Unity SocialStarter example scene demonstrates using Oculus Avatars together with other Oculus Platform features such as invites, peer-to-peer networking, and VoIP.

This scene depicts a virtual room into which you can invite your friends who are also running the scene. As your friends join your room, the scene sets up a VoIP connection to transmit voice packets and a peer-to-peer connection to transmit Avatar packets.

Requirements

For full functionality, this sample scene requires the following:

  • An App ID from the Oculus Dashboard.
  • A build associated with the App ID must be uploaded to a release channel on the Dashboard.
  • The email associated with your Oculus account must be added to the user list for the release channel of the build.

Setup Instructions

  1. Create a new Unity project.

  2. Import the Oculus Integration from the Unity Asset Store.

  3. From the Oculus Dashboard, create an Oculus Rift app and copy the App ID. An App ID is required to use Avatar and Platform features. There must be a build associated with the App ID uploaded to a release channel on the Dashboard for full functionality. The email address associated with your Oculus account must be added to the Users list of the release channel.

  4. Open the SocialStarter scene in Assets/Oculus/Avatar/Samples/SocialStarter.

  5. From the Unity Editor menu bar, select Oculus > Avatars > Edit Configuration and place your App ID in the two fields for Oculus Rift App Id and Oculus Go/Quest or Gear VR.

  6. Confirm that the prefabs are set correctly. Select the OVRPlayerController object in the scene:

    • Local Avatar Prefab should be set to the LocalAvatar (OvrAvatar) prefab found at Assets/Oculus/Avatar/Content/Prefabs.
      • Remote Avatar Prefab should be set to the RemoteAvatar (OvrAvatar) prefab found at Assets/Oculus/Avatar/Content/Prefabs.
      • Rift Material should be set to the Help material found at Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials.
      • Gear Material should be set to the GearHelp material found at Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials.

How to Use

When you start the sample, you are placed in a virtual room with a floor and a sphere. The colors of the floor and sphere convey information about room ownership and online status.

  • The floor color indicates whether you are the owner of the room. Blue means you are the owner of the room. Green means you are a member of the room that joined via an invitation from the owner.
  • The sphere color indicates whether you are in an online room. White means you are in an online room. Black means that either online room creation or an invite attempt failed for some reason.

When a user joins your room, a VoIP connection and a P2P connection will be set up. The P2P connection is used to send Avatar and positional updates. Note that this functionality only works if you have uploaded a build to the Dashboard for the App ID you used.

Your left hand should be holding the control instructions. If you do not see the instructions, make sure that Rift Material and Gear Material are set properly as described in the setup instructions.

Oculus Rift and Oculus Quest Controls Left stick click: Toggle display of instructions. Y Button: Toggle the sky camera. This allows you to view the scene from a static third-person camera. X Button: Room invites. This will bring up the invite UI, which will show a list of your friends that you can invite to the room. This may take a second or two to pop up. Note that this functionality only works if you have uploaded a build to the Dashboard for the App ID you used. Left stick: Move around. Right stick: Rotate direction.

Oculus Go and Gear VR Controls Trigger: Toggle display of instructions. Touchpad click: Toggle the sky camera. Back button: Room invites. Touchpad: Move around.