Method FinalizePrefabComponents
FinalizePrefabComponents(Config, EntityManager, Entity, GhostType, NativeArray<Entity>, NativeList<ComponentType>, NativeArray<int>, NetcodeConversionTarget, NativeArray<GhostPrefabType>)
Strip components which are not used, and add the ones which should always be present on a ghost prefab
Declaration
public static void FinalizePrefabComponents(GhostPrefabCreation.Config ghostConfig, EntityManager entityManager, Entity rootEntity, GhostType ghostType, NativeArray<Entity> linkedEntities, NativeList<ComponentType> allComponents, NativeArray<int> componentCounts, NetcodeConversionTarget target, NativeArray<GhostPrefabType> prefabTypes)
Parameters
Type | Name | Description |
---|---|---|
Ghost |
ghostConfig | Configuration used when creating ghost prefabs. |
Entity |
entityManager | Used to validate which components exists on |
Entity | rootEntity | Components existing on this entity, like Ghost |
Ghost |
ghostType | Component storing the guid of the prefab the ghost was created from. |
Native |
linkedEntities | List of all linked entities to the |
Native |
allComponents | List of all component types. |
Native |
componentCounts | List of number of components on each index. |
Netcode |
target | |
Native |
prefabTypes | List of different types of Ghost |