protected override void OnCreate() { //@TODO: Support SetFilter with EntityQueryDesc syntax m_FrozenGroup = GetEntityQuery( ComponentType.ChunkComponentReadOnly <ChunkWorldRenderBounds>(), ComponentType.ReadOnly <WorldRenderBounds>(), ComponentType.ReadOnly <LocalToWorld>(), ComponentType.ReadOnly <RenderMesh>(), ComponentType.ReadOnly <FrozenRenderSceneTag>() ); m_DynamicGroup = GetEntityQuery( ComponentType.ChunkComponentReadOnly <ChunkWorldRenderBounds>(), ComponentType.Exclude <FrozenRenderSceneTag>(), ComponentType.ReadOnly <WorldRenderBounds>(), ComponentType.ReadOnly <LocalToWorld>(), ComponentType.ReadOnly <FloatMaterialPropertyBlock>(), ComponentType.ReadOnly <RenderMesh>() ); // This component group must include all types that are being used by the culling job m_CullingJobDependencyGroup = GetEntityQuery( ComponentType.ChunkComponentReadOnly <ChunkWorldRenderBounds>(), ComponentType.ReadOnly <RootLodRequirement>(), ComponentType.ReadOnly <LodRequirement>(), ComponentType.ReadOnly <WorldRenderBounds>() ); m_InstancedRenderMeshBatchGroup = new InstancedRenderMeshBatchGroup(EntityManager, this, m_CullingJobDependencyGroup); m_SubsceneTagVersion = new NativeHashMap <FrozenRenderSceneTag, int>(1000, Allocator.Persistent); m_LastKnownSubsceneTagVersion = new NativeList <SubSceneTagOrderVersion>(Allocator.Persistent); }
protected override void OnCreateManager() { //@TODO: Support SetFilter with EntityArchetypeQuery syntax /* * m_FrozenGroup = GetComponentGroup(new EntityArchetypeQuery * { * Any = Array.Empty<ComponentType>(), * None = Array.Empty<ComponentType>(), * All = new ComponentType[] * {typeof(ChunkWorldRenderBounds), typeof(WorldRenderBounds), typeof(LocalToWorld), typeof(RenderMesh), typeof(FrozenRenderSceneTag)} * }); */ m_FrozenGroup = GetComponentGroup(typeof(ChunkWorldRenderBounds), typeof(WorldRenderBounds), typeof(LocalToWorld), typeof(RenderMesh), typeof(FrozenRenderSceneTag)); m_DynamicGroup = GetComponentGroup(new EntityArchetypeQuery { Any = Array.Empty <ComponentType>(), None = new ComponentType[] { typeof(FrozenRenderSceneTag) }, All = new ComponentType[] { typeof(WorldRenderBounds), typeof(LocalToWorld), typeof(RenderMesh) } }); // This component group must include all types that are being used by the culling job m_CullingJobDependencyGroup = GetComponentGroup(typeof(RootLodRequirement), typeof(LodRequirement), typeof(WorldRenderBounds)); m_InstancedRenderMeshBatchGroup = new InstancedRenderMeshBatchGroup(EntityManager, this, m_CullingJobDependencyGroup); m_SubsceneTagVersion = new NativeHashMap <FrozenRenderSceneTag, int>(1000, Allocator.Persistent); m_LastKnownSubsceneTagVersion = new NativeList <SubSceneTagOrderVersion>(Allocator.Persistent); }