protected override void OnCreate()
 {
     _resourcesMapping  = World.GetOrCreateSystem <RenderingResourcesMappingSystem>();
     _meshesForCreating = GetEntityQuery(
         ComponentType.ReadOnly <FlatMeshBlobComponent>(),
         ComponentType.Exclude <MeshInitialized>());
     _removedMeshes = GetEntityQuery(
         ComponentType.Exclude <FlatMeshBlobComponent>(),
         ComponentType.ReadOnly <MeshInitialized>());
     _cachedForEach = CreateMeshFromMeshData;
 }
Пример #2
0
 protected override void OnCreate()
 {
     _renderSystem    = World.GetOrCreateSystem <RenderingPropBlockSystem>();
     _resourcesSystem = World.GetOrCreateSystem <RenderingResourcesMappingSystem>();
     _notDeclaredYet  = GetEntityQuery(
         ComponentType.ReadOnly <RenderingElement>(),
         ComponentType.Exclude <BatchAddedToRendering>());
     _deletedQuery = GetEntityQuery(
         ComponentType.ReadOnly <BatchAddedToRendering>(),
         ComponentType.Exclude <RenderingElement>());
     _declareRenderingForEach = DeclateForRendering;
     _deleteRenderingForEach  = DeleteFromRendering;
 }