> For the complete documentation index, see [llms.txt](https://reach-cloud.gitbook.io/reach-explorer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reach-cloud.gitbook.io/reach-explorer-documentation/metaverse-cloud-engine-sdk/unity-engine-sdk/components/assets/meta-prefab.md).

# Meta Prefab

{% hint style="info" %}
For more information about how to upload a meta prefab, click below.
{% endhint %}

{% content-ref url="/pages/YcyfitTgUHR8oAGTdgWP" %}
[Upload a Prefab](/reach-explorer-documentation/metaverse-cloud-engine-sdk/unity-engine-sdk/upload-a-prefab.md)
{% endcontent-ref %}

### MetaPrefab Documentation

The MetaPrefab class represents a prefab within the Metaverse. A prefab is a piece of content that can be spawned into the world. MetaPrefabs are similar to Unity prefabs, but they are stored on the server and can be loaded and spawned dynamically at runtime.

#### Namespace

MetaverseCloudEngine.Unity.Assets.MetaPrefabs

#### Public Methods

* **void Allocate():** Registers this MetaPrefab instance with the MetaPrefabLoadingAPI. This method is typically called automatically when the MetaPrefab is spawned.
* **bool CheckRenderPipeline(bool addMapperToChildren = false):** Checks whether the MetaPrefab is compatible with the current render pipeline and applies any necessary material remapping.

#### Public Properties

* **MetaPrefabSpawner Spawner (read only):** The spawner that spawned this prefab.
* **bool UsesScriptableRenderPipeline (read only):** Whether or not this prefab is supported by the scriptable render pipeline.

#### Inspector Fields

* **MetaPrefabMetadata MetaData:** The asset's metadata, which includes details such as the name, description, and blockchain references.
* **bool scriptableRenderPipelineSupported:** Whether or not this prefab is supported by the scriptable render pipeline.

#### Behavior

* **Execution Order:** This class inherits from MetaverseBehaviour, which uses the default Unity execution order.

#### Usage

1. To use MetaPrefab, start by adding the component to a GameObject in your scene. This GameObject should be a prefab.
2. Configure the MetaData property to specify the details of your MetaPrefab.
3. You can then use the MetaPrefabSpawner component to spawn your MetaPrefab at runtime.

**Additional Notes:**

* MetaPrefabs can be uploaded to the Metaverse Cloud Engine using the MetaPrefabEditor in the Unity Editor.
* MetaPrefabs can be nested, meaning that a MetaPrefab can contain other MetaPrefabs as children.
* The MetaPrefabLoadingAPI is used to load MetaPrefabs into memory so that they can be spawned at runtime.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://reach-cloud.gitbook.io/reach-explorer-documentation/metaverse-cloud-engine-sdk/unity-engine-sdk/components/assets/meta-prefab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
