> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta Fork Specifics

The Meta Fork of Unreal Engine is a customized version of Unreal Engine, created by Meta to support advanced features for the Meta Presence Platform. These features include Passthrough, Scene API, and Spatial Anchors, enabling enhanced VR interactions for Meta Quest devices. This section details how to set up and utilize the Meta Fork, its configurations, and why it is essential for certain features.

## **Overview of Meta Fork**

### **What is the Meta Fork?**

The Meta Fork is a modified Unreal Engine build that integrates optimizations and features specific to Meta Quest devices. It allows developers to:

* Access the **Meta Presence Platform**.
* Use advanced features like **Passthrough**, **Scene API**, and **Spatial Anchors**.
* Optimize performance for Meta Quest and future Meta VR hardware.

<img src="https://mintcdn.com/liv/v4zFUEfIihMyS4q1/images/mrc/1(2).png?fit=max&auto=format&n=v4zFUEfIihMyS4q1&q=85&s=5be87eeeabf0e911f4542f3b1ced53ba" alt="1(2)" width="1200" height="630" data-path="images/mrc/1(2).png" />

### **When to Use the Meta Fork**

* **Presence Platform Features**: If your project requires Passthrough, Scene API, or Spatial Anchors.
* **Meta-Specific Optimization**: If you’re targeting Meta Quest devices for optimal performance.
* **Unreal Engine Version**: If you are using Unreal **5.4+**.

### **Available Configurations**

| Setup                            | Description                                                           | Use Case                                 |
| :------------------------------- | :-------------------------------------------------------------------- | :--------------------------------------- |
| Stock Unreal Engine              | Official Unreal Engine from Epic Games Launcher or source builds.     | Standard VR projects.                    |
| Stock Engine with Meta XR Plugin | Adds basic Meta XR functionality without Meta-specific optimizations. | Limited support for Meta features.       |
| Meta Fork                        | Custom Unreal Engine version enabling Presence Platform features.     | Required for advanced Meta capabilities. |

## **Why Use the Meta Fork?**

The Meta Fork is essential for accessing the **Meta Presence Platform** features. These features enhance your VR applications by enabling the following:

### **Key Features**

1. **Passthrough**:
   * Leverages Meta Quest’s cameras to blend real-world visuals with the virtual environment.
   * Perfect for augmented reality (AR) or mixed reality (MR) applications.
2. **Scene API**:
   * Allows for detailed spatial understanding of the physical environment.
   * Enables object placement and interactions based on real-world geometry.
3. **Spatial Anchors**:
   * Provides persistent world anchors for objects in the VR/AR space.
   * Ensures objects maintain their position across sessions.

## **How to Set Up the Meta Fork**

The Meta fork of Epic’s Unreal Engine will give you the most up to date integration of Oculus features. However, you must build the editor from its source. To use the Meta Fork, follow these steps:

### **Step 1: Download the Meta Fork**

1. Follow the instructions on [Accessing Unreal Engine source code on GitHub](https://www.unrealengine.com/en-US/ue-on-github) to obtain:
   * an Epic account
   * a GitHub account
   * authorization to access the Unreal Engine source repositor
2. **Download the Meta Fork**:
   * Go to the [**Meta Fork repository on GitHub**](https://github.com/Oculus-VR/UnrealEngine) (Need to complete step 1 to access the link) and download the source code.

### **Step 2: Build the Meta Fork from Source**

Once you have downloaded the Meta Fork source code, you need to build it:

#### **Install Prerequisites**

* **Git**: Required for source code version control.
* **Visual Studio** 2022 with the following workloads:
  * **Desktop Development with C++**
  * **Game Development with C++**
* **DirectX End-User Runtime**: Install the latest DirectX runtime.

#### **Clone the Repository**

1. Open a terminal or Git client.
2. Clone the repository using the command provided in the Meta Developer Portal:

   `git clone https://github.com/Meta/unreal-engine-fork.git`

#### **Run Setup Script**

1. Navigate to the cloned repository directory.
2. Run the Setup.bat to download dependencies and set up the required files for the engine.

<img src="https://mintcdn.com/liv/o6CJmZJW7ShcAPtG/images/mrc/2(2).png?fit=max&auto=format&n=o6CJmZJW7ShcAPtG&q=85&s=a19eb3d0f92618cf222852d626387031" alt="2(2)" width="622" height="542" data-path="images/mrc/2(2).png" />

#### **Generate Project Files**

Run the GenerateProjectFiles.bat to generate Visual Studio project files.

<img src="https://mintcdn.com/liv/QCrX02-c3RRr2qsY/images/mrc/3(1).png?fit=max&auto=format&n=QCrX02-c3RRr2qsY&q=85&s=da45545bf6a42d1a63a21d516967c086" alt="3(1)" width="626" height="168" data-path="images/mrc/3(1).png" />

**Build the Engine**

1. Open the generated `.sln` file in Visual Studio.

<img src="https://mintcdn.com/liv/_nrQT5BWwfwhvqOR/images/mrc/4(1).png?fit=max&auto=format&n=_nrQT5BWwfwhvqOR&q=85&s=841746fa65b69ac6a5c6313d2125c9e4" alt="4(1)" width="615" height="81" data-path="images/mrc/4(1).png" />

2. Build the engine in **Development Editor** mode:

* **Solution Configuration**: `Development Editor`
* **Solution Platform**: `Win64`

<img src="https://mintcdn.com/liv/pNeDuL7h9lTGhONq/images/mrc/5(1).png?fit=max&auto=format&n=pNeDuL7h9lTGhONq&q=85&s=70ae532040abb95caa94d1da7f084396" alt="5(1)" width="239" height="180" data-path="images/mrc/5(1).png" />

3. Wait for the build process to complete. This may take some time.

Note : Detailed [guide to build Unreal Engine from Source](https://dev.epicgames.com/documentation/en-us/unreal-engine/building-unreal-engine-from-source)

### **Step 3: Launch the Meta Fork Editor**

Once the build is complete, launch the editor:

1. Locate the executable:

   `[MetaForkPath]/Engine/Binaries/Win64/UE5Editor.exe`
2. Double-click to open the Meta Fork Editor.

## **Integrating the LIV SDK with Meta Fork**

After building and launching the Meta Fork, integrate the LIV SDK using the steps in the [Installing and Configuring the LIV SDK](https://mrc-docs.liv.tv/sdk-for-unreal/installing-and-configuring) section.

## **Testing LIV with Meta Presence Platform Features**

### **Testing Passthrough**

1. Enable **Passthrough** in the project:
   * Open **Project Settings**.
   * Navigate to **Plugins > Meta XR**.
   * Enable **Passthrough** and configure its settings.

<img src="https://mintcdn.com/liv/2_kW-hlzMFGXZyUM/images/mrc/6(1).png?fit=max&auto=format&n=2_kW-hlzMFGXZyUM&q=85&s=2450768d51027c06cb822a3ed3ef9aa2" alt="6(1)" width="399" height="52" data-path="images/mrc/6(1).png" />

2. Test in VR Preview mode to ensure Passthrough functionality is working.

### **Testing Scene API**

1. Enable the Scene API:
   * Go to **Project Settings > Meta XR**.
   * Enable **Scene Support** and configure the necessary settings.

     <img src="https://mintcdn.com/liv/R97mnVaSu3zQwt_b/images/mrc/7(1).png?fit=max&auto=format&n=R97mnVaSu3zQwt_b&q=85&s=cbbc122fbab5704acc3abb8abf71162d" alt="7(1)" width="387" height="52" data-path="images/mrc/7(1).png" />
2. Use sample code from Meta’s documentation to validate Scene API functionality.

### **Testing Spatial Anchors**

1. Enable Spatial Anchors:
   * Open **Project Settings**.
   * Navigate to **Plugins > Meta XR**.
   * Enable **Anchors Support**.

     <img src="https://mintcdn.com/liv/X4KZxtDwad--fb3F/images/mrc/8(1).png?fit=max&auto=format&n=X4KZxtDwad--fb3F&q=85&s=3d437196595c18d3abf3240b948826e8" alt="8(1)" width="392" height="51" data-path="images/mrc/8(1).png" />
2. Test by saving and loading anchors across sessions.

## **Frequently Asked Questions**

**Q: Do I need the Meta Fork if I’m not using Presence Platform features?**

A: No, you can use the stock Unreal Engine with the LIV SDK for standard MR features. The Meta Fork is required only for Meta-specific features like Passthrough, Scene API, and Spatial Anchors.

**Q: Can I install the Meta Fork alongside the stock Unreal Engine?**

A: Yes, the Meta Fork can coexist with the stock Unreal Engine. You can maintain separate installations for different projects.

**Q: How do I ensure compatibility with the LIV SDK?**

A: Use Unreal Engine **5.4+** (Meta Fork) and configure the project settings as described in the [Installing and Configuring the LIV SDK](https://mrc-docs.liv.tv/sdk-for-unreal/installing-and-configuring)
