Develop
Develop
Select your platform

Native C/C++ Mirror Sample Guide

Start using Meta Avatars in your native C/C++ app by experimenting with the Mirror sample included with the Meta Avatar SDK. The Mirror sample implements multiple avatar features, making it a good foundation for implementing avatars in your own code.

Download the Meta Avatar SDK

To use avatars in your native C/C++ application, you must download and use the Meta Avatar SDK.
  1. Download the Meta Avatar SDK from our Downloads page.
  2. Extract the contents of the ZIP archive to your local drive.

Building the Mirror Sample with Microsoft Visual Studio (Oculus Rift)

  1. Make sure the Rift is correctly connected to the PC.
  2. Download and install cmake from https://cmake.org/download.
  3. From a command prompt, go to OVRAvatarSDK\Samples\Mirror\Projects\Windows.
  4. At the command prompt, enter cmake .. The project should build.
  5. In Visual Studio, open the Mirror.sln file that was created at OVRAvatarSDK\Samples\Mirror\Projects\Windows.
  6. Press F5 to debug and run.

Building the Mirror Sample with Android Studio (Meta Quest and Meta Quest 2)

  1. Make sure the Meta Android device is correctly connected to the PC or Mac.
  2. Open a Windows command prompt or macOS terminal window and go to OVRAvatarSDK\Samples\Mirror\Projects\Android.
  3. Enter build.py. The project should build.
  4. In Android Studio, choose to open an existing project and select OVRAvatarSDK\Samples\Mirror\Projects\Android.
  5. After the project has loaded, select Run > Run ‘Android’ to debug and run.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon