Develop
Develop
Select your platform

Native C/C++ Mirror Sample Guide (Deprecated)

Updated: Sep 29, 2022
Mobile SDK Deprecation
As of August 31, 2022, Mobile SDK and the VrApi library are no longer supported. Future updates will be delivered through OpenXR extensions and our OpenXR Mobile SDK, not through any new updates to Meta Mobile or PC APIs.
Discontinuing Mobile SDK support means:
  • New apps must use OpenXR unless a waiver is granted.
  • New apps will not have access to Meta Native Mobile APIs, but existing apps can continue using them.
  • No assistance will be provided for creating new apps with Meta Native APIs. You will find recommendations for migrating existing apps to OpenXR in the developer guides.
  • Only critical security, privacy, or safety issues in Meta Native APIs will be addressed.
  • Any testing of Meta Native Mobile will be restricted to automated QA tests, only to ensure core features remain functional.
For more information about this deprecation, see Meta All In on OpenXR: Deprecates Proprietary APIs.
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