How should i approach writing a Rect Packing Algorithm in Jobs

Hi there,

I have written a basic level rect packing algorithm in typical C# way where i define my shapes as 2D Array and then try to fit those Shapes (2d arrays) in a bigger 2D Array, and this code works like Backtracking Algorithms
Pretty simple

Now if i want to make use of Job system? What would i use? Is there a 2D Array Collection?
Can i run multiple jobs (so multiple packing algos run) at the same time on different thread and then i can choose which one fit the most items? If so what type of Job i’d use?

Please advise

Use a single-threaded IJob with Burst and see how far that gets you before you try to parallelize things.

A 2D array is really just a 1D array with the indexing formula of (row, indexInRow) => row * rowLength + indexInRow