I want to learn jobs but its kind of tough to understand and googling stuff on it brings up examples of jobs used within ECS (which I’m not using) and offers for literal careers with unity (which is not as amusing as it is hilarious). catlike coding actually has a tutorial where they animate a fractal in jobs, which at first seemed simple enough, but by the end I was lost.
Here’s a fairly simple example of job use without the use of ecs/entities. This isn’t realistic in the sense the work being done is so trivial you wouldn’t need to jobify this, but it should demonstrate how basic job use is done.
You use native containers(array/list etc) to pass data to jobs or between jobs and/or from jobs as well as for reading the results.
You can also allocate them inside of jobs using the .Temp Allocator(which doesn’t need to be disposed), as well as have .Persistent allocations which don’t need to be disposed(until required or game shutdown).
I just saw that the manual has another example showing slightly different but also basic use Unity - Scripting API: IJob
A practical incremental example that comes with a video: GitHub - Dreaming381/HeartPromoDOTS: Repo used to teach fundamentals of DOTS for GameObjects
video link?