public static JobHandle ToDataWithEntity <TData, TComponentData>(
     this EntityQuery entityQuery,
     NativeArray <TData> sourceData,
     ref NativeArray <DataWithEntity <TData> > resultDataWithEntity,
     JobHandle inputDeps)
     where TData : struct, IComparable <TData>
     where TComponentData : struct, IComponentData
 {
     inputDeps = new ConvertToDataWithEntity <TData, TComponentData> {
         Source = sourceData,
         Target = resultDataWithEntity
     }.Schedule(entityQuery, inputDeps);
     return(inputDeps);
 }
示例#2
0
 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.GetArchetypeChunkEntityType(),
         Source          = sourceData,
         Target          = resultDataWithEntity
     }.Schedule(entityQuery, inputDeps);
     return(inputDeps);
 }