public static JobHandle DestroyTransformHierarchy <T>(this ComponentSystemBase system, EntityQuery query, EntityCommandBuffer cmdBuffer, JobHandle inputDeps) where T : struct, IComponentData { return(new DestroyTransformHierarchy <T> { ChunkEntityType = system.GetEntityTypeHandle(), ChildrenFromEntity = system.GetBufferFromEntity <Child>(true), CmdBuffer = cmdBuffer.AsParallelWriter() }.Schedule(query, inputDeps)); }
public static JobHandle DestroyEntityOnly( this EntityQuery query, ComponentSystemBase system, EntityCommandBuffer entityCommandBuffer, JobHandle inputDeps) { return(new DestroyEntitiesOnly { CmdBuffer = entityCommandBuffer.AsParallelWriter(), EntityOnlyArchetype = system.EntityManager.CreateArchetype(), EntityType = system.GetEntityTypeHandle() }.Schedule(query, inputDeps)); }
public static JobHandle CopyFromChangedComponentData <T>( this EntityQuery query, ComponentSystemBase system, ref NativeHashMap <Entity, T> resultChangedComponentData, JobHandle inputDeps) where T : struct, IComponentData { inputDeps = new CopyFromChangedComponentData <T> { EntityType = system.GetEntityTypeHandle(), ChunkType = system.GetComponentTypeHandle <T>(false), ChangedComponentData = resultChangedComponentData }.Schedule(query, inputDeps); return(inputDeps); }
public static LayerChunkTypeGroup BuildLayerChunkTypeGroup(ComponentSystemBase system) { LayerChunkTypeGroup result = new LayerChunkTypeGroup { collider = system.GetComponentTypeHandle <Collider>(true), translation = system.GetComponentTypeHandle <Translation>(true), rotation = system.GetComponentTypeHandle <Rotation>(true), scale = system.GetComponentTypeHandle <PhysicsScale>(true), parent = system.GetComponentTypeHandle <Parent>(true), localToWorld = system.GetComponentTypeHandle <LocalToWorld>(true), entity = system.GetEntityTypeHandle() }; return(result); }
public static JobHandle ToDataWithEntity <TData>( this EntityQuery entityQuery, ComponentSystemBase system, NativeArray <TData> sourceData, ref NativeArray <DataWithEntity <TData> > resultDataWithEntity, JobHandle inputDeps) where TData : struct, IComparable <TData> { inputDeps = new ConvertToDataWithEntity <TData> { ChunkEntityType = system.GetEntityTypeHandle(), Source = sourceData, Target = resultDataWithEntity }.Schedule(entityQuery, inputDeps); return(inputDeps); }
public static JobHandle GetChangedComponentDataFromEntity <T>( this EntityQuery query, ComponentSystemBase system, ref NativeHashMap <Entity, T> resultHashMap, JobHandle inputDeps) where T : struct, IComponentData { inputDeps = resultHashMap.Clear(inputDeps, query.CalculateEntityCount()); inputDeps = new ChangedComponentToEntity <T> { EntityType = system.GetEntityTypeHandle(), ChunkType = system.GetComponentTypeHandle <T>(true), ChangedComponents = resultHashMap.AsParallelWriter(), LastSystemVersion = system.LastSystemVersion }.Schedule(query, inputDeps); return(inputDeps); }
public void BeginSerialize(ComponentSystemBase system, NativeArray <ArchetypeChunk> chunks) { AllChunks = chunks; GhostType = system.GetComponentTypeHandle <GhostIdentifier>(); EntityType = system.GetEntityTypeHandle(); }
public void ScheduleTimeInitialize(ComponentSystemBase jobComponentSystem, bool isReadOnly) { _typeHandle = jobComponentSystem.GetEntityTypeHandle(); }