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:
The PrefabSystem
will convert them all to prefabs when starting.
Regular Prefabs
Regular prefabs that live in the Project Area:
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:
It has a PrefabSystemAuthoring
component with the Prefabs list where you can drag your prefabs into:
PrefabSystem API
Field: | Description: |
| All regular prefabs converted to Entity, by prefabId. |
| All scene objects convert to Entity, by prefabId. |
Function: | Description: |
| Find a prefab by prefabId. This searches both the regular prefabs and the scene objects. Call this function to find the prefab, then use EntityManager.Instantiate to instantiate it. |
Last updated