Deferred NativeArray IJobForEach_BC

Hello,

Wondering if someone could help me out, how do I create a deferred NativeArray for IJobForEach_BC, the meshTrianglePositions array should only be create if a the GetMeshTrianglePositions executes.

//
// Get Mesh Positions
var meshTrianglePositions = new NativeArray<Vector3>(triangleCount[0] * 3, Allocator.TempJob);

inputDeps = new GetMeshTrianglePositions
{
    MeshTrianglePositions = meshTrianglePositions,
    TileBuffer = GetBufferFromEntity<TilesBufferComponent>(true)
}.ScheduleSingle(_qTrianglesBuffer, inputDeps);

I guess this GetMeshTrianglePositions require some component to run? You can simply call RequireForUpdate in OnCreate, or hide the creation logic inside a if-check, if (query.CalculateEntityCount > 0){// Create array, schedule job.}