Class GhostPresentationGameObjectSystem
This system will spawn presentation game object for ghosts which requested it. The system runs right after the client spawning code to make sure the game object is created right away. On the server it is important to either deal with not having a presentation game object (by filtering on the cleanup component) or do all spawning in the BeginSimulationCommandBufferSystem to make sure the game objects are created at the same time
Inherited Members
Namespace: Unity.NetCode .Hybrid
Assembly: Unity.NetCode.Hybrid.dll
Syntax
[WorldSystemFilter(WorldSystemFilterFlags.ServerSimulation|WorldSystemFilterFlags.ClientSimulation, WorldSystemFilterFlags.Default)]
[RequireMatchingQueriesForUpdate]
[UpdateInGroup(typeof(NetworkReceiveSystemGroup), OrderFirst = true)]
public class GhostPresentationGameObjectSystem : SystemBase
Methods
GetGameObjectForEntity(EntityManager, Entity)
Lookup the presentation GameObject for a specific entity. The entity does not have a direct reference to the GameObject, it needs to go through this method to find it.
Declaration
public GameObject GetGameObjectForEntity(EntityManager entityManager, Entity ent)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityManager | For looking up the entity |
Entity | ent | Entity to find presentation Game |
Returns
Type | Description |
---|---|
Game |
Game |