# Prefabs

A "prefab," short for "prefabricated object," refers to a reusable and preconfigured object that encapsulates a combination of inner objects, components, configurations. Prefabs are designed to simplify and streamline the process of creating and managing game content. Instead of recreating the same objects with the same attributes multiple times, you can create prefabs as templates for commonly used elements, such as characters, items, or environmental objects.

## Creating prefabs

You can either create a prefab from an already existing set of objects or create a new.

### From selection

If you already have one or more objects in the scene that you want to make into a reusable prefab, you can group them together (shift+G) and then in the outliner, right click the group and click "Convert to a prefab". The name of the group will be the name of the prefab asset. The group in your scene will be replaced by the prefab object.

<figure><img src="/files/B8oEhMSu3mrxV1FksTd4" alt="Convert to a prefab"><figcaption><p>Convert to a prefab from outliner</p></figcaption></figure>

### From the asset browser

You can also create a new empty prefab from the asset browser by clicking "Add new". You will be prompted to enter a name for the prefab asset.

<figure><img src="/files/JcieAO7mzvhb5RAZWZcF" alt=""><figcaption><p>Create a new empty prefab</p></figcaption></figure>

## Editing prefabs

A prefab can be edited by opening the prefab editor either by selecting a prefab instance in your outliner or from the asset browser. This will open the prefab editor in a new tab. In the prefab editor, you can make any changes you want to any of the objects inside the prefab as well as to add additional objects. After saving the prefab (ctrl+S), the changes to the prefab will automatically update in any scene where it is being used.

<figure><img src="/files/3cRjYNvFNacRwqkyNiaN" alt=""><figcaption><p>Open prefab editor</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.hology.app/assets/prefabs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
