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. - 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.
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.
To use avatars in your native C/C++ application, you must download and use the Meta Avatar SDK.
- Download the Meta Avatar SDK from our Downloads page.
- Extract the contents of the ZIP archive to your local drive.
Building the Mirror Sample with Microsoft Visual Studio (Oculus Rift)
- Make sure the Rift is correctly connected to the PC.
- Download and install cmake from https://cmake.org/download.
- From a command prompt, go to
OVRAvatarSDK\Samples\Mirror\Projects\Windows
. - At the command prompt, enter
cmake .
. The project should build. - In Visual Studio, open the
Mirror.sln
file that was created at OVRAvatarSDK\Samples\Mirror\Projects\Windows
. - Press F5 to debug and run.
- Make sure the Meta Android device is correctly connected to the PC or Mac.
- Open a Windows command prompt or macOS terminal window and go to
OVRAvatarSDK\Samples\Mirror\Projects\Android
. - Enter
build.py
. The project should build. - In Android Studio, choose to open an existing project and select
OVRAvatarSDK\Samples\Mirror\Projects\Android
. - After the project has loaded, select Run > Run ‘Android’ to debug and run.