I'm new to ECS, so excuse the potentially silly question 😅
I'm making a boids sim, my boid system first constructs an array of all positions and rotations of the boids, before passing this array to the BoidSimulateJob, which takes a BoidAspect in its Execute method. The job looks at the array of positions/rotations to modify the transform of its own BoidAspect. This all works fine, but the problem is I then need to dispose of this position/rotation array in my system, but only once the BoidSimulateJob has completed... how can I track when the job is completed if I use .ScheduleParallel? I don't get any JobHandler like I would with .Schedule.
I tried turning my job into a regular IJob, and looping over all BoidAspects in my system and kicking off a job for each one, and passing the boidAspect (which contains the boid transform to be modified directly), but then I ran into all kinds of errors about unsafe pointers..
What's the proper way to do this? It feels like it should be simple, but I'm having trouble tracking down the right approach online