> For the complete documentation index, see [llms.txt](https://dotsnet.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dotsnet.gitbook.io/docs/user-manual/prefabsystem.md).

# PrefabSystem

**DOTSNET** comes with its own system to spawn prefabs across the network.

The `PrefabSystem` can be found in both the `ServerWorld` and the `ClientWorld`.

### Scene Prefabs

Networked Entities like Monsters can be added to the Scene:

![](https://lh5.googleusercontent.com/kuRZ1eWQqtR-0DC3mq8iU7hS8gG2R5JD5C17klWnqqeGwkFYxgDe04NI-Tv_ZWx1flt6PoLqMz1Z64AObt9d9sEjrEMIMklyUWE9rriS9LWYJl8g1Oos4hIUBkmlUwMZRwsBFKCI)

The `PrefabSystem` will convert them all to prefabs when starting.

### Regular Prefabs

Regular prefabs that live in the Project Area:

![](https://lh6.googleusercontent.com/Ezzj_UXlZp2x327tgTWmH-BJm7Nj1hxHth7vyp_akIRevEeH3wqMw7BKis4YkRZ6pppLoLA-3ljGJc-gxV86cev27vs_xLJbt_zEBxtCENxuvDzTGVPtzaPl3YbxrrB4lB0gZAVL)

Need to be dragged into the `PrefabSystem`’s Prefabs list manually in order to spawn them over the network. You can find the `PrefabSystem` in the Hierarchy:

![](https://lh6.googleusercontent.com/tlkyY2xgJPX-FHi9WFCipPDWGgvldrXezEJmw7auT-yXC3gvWK5SAYVd3ME6wIF4b0-Wu7hNjVFg-8HWMNN44pg5-DNIggofcoEM-XZ0ySGSXWt4dJyhB-roOXEbs056-_Blkn7m)

It has a `PrefabSystemAuthoring` component with the Prefabs list where you can drag your prefabs into:

![](https://lh6.googleusercontent.com/SVVssGjjsUzTzzRMW7KFFbPaKFQrnumC049PkT-CIdb5OSBzqiYlY-yfuUdRxh1o9P92MO_0FeuKbexLyKoOmeX0S8MX27ywKJ5G0Zzctu3P3FFh1i1J8ZOLIBH7eowcHnhOyLh_)

## PrefabSystem API

| Field:         | Description:                                          |
| -------------- | ----------------------------------------------------- |
| `prefabs`      | All regular prefabs converted to Entity, by prefabId. |
| `scenePrefabs` | All scene objects convert to Entity, by prefabId.     |

| Function:                   | Description:                                                                                                                                                                                       |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Get(prefabId, out Entity)` | <p>Find a prefab by prefabId. This searches both the regular prefabs and the scene objects.</p><p>Call this function to find the prefab, then use EntityManager.Instantiate to instantiate it.</p> |
