#13 C# Job System - Simple Example - Unity Tutorial

preview_player
Показать описание
I'm not sure if I can call this one a tutorial cuz it's just a simple example, but it should be enough to get you started if you've never tried using the Job System. Next I might try ECS (entity component system) or some other stuff related to DOTS.

I forgot to mention Burst Compiler but you just gotta use [BurstCompile] and make sure it's enabled:

Also check dependencies from other packages if you're getting an error in the package manager:
(must install correct packages in their correct versions)

Namespace:

Simple method using Job System (by Code Monkey):

Get output from Job System (by Code Monkey):

Playlist (Experimental Character Controller):

Repository:

Files are available here:

Any questions/comments? Join us on discord:

Social

Patreon:

Channel Memberships:

#gamedev #indiegame #unitytutorial #devlog
Рекомендации по теме
Комментарии
Автор

I'm not sure if I can call this one a tutorial cuz it's just a simple example, but it should be enough to get you started if you've never tried using the Job System. Next I might try ECS (entity component system) or some other stuff related to DOTS.

I forgot to mention Burst Compiler but you just gotta use [BurstCompile] and make sure it's enabled:

Also check dependencies from other packages if you're getting an error in the package manager:
(must install correct packages in their correct versions)

Namespace:

Simple method using Job System (by Code Monkey):

Get output from Job System (by Code Monkey):

Playlist (Experimental Character Controller):

Repository:

Files are available here:

Any questions/comments? Join us on discord:

Roundbeargames
Автор

Could you please show more examples how to use the job system without ECS DOTS. If ECS DOTS is included it will just become much more complicated. I and I think many others are already struggling with the BurstCompile using Job. Woudl be extremely happy if you could make a few examples.

For example using a cube that in a random direction and 1000 or more cubes are following the first cube. Similar as in a snake game. I would love to use a manager that manages all cubes and uses burst without DOTS.

HelloGermanCom
Автор

i tried to put job system in use on my game, i used it on enemy path finding and updating angles/direction to the player, i found that unless you are going to run the same performance expensive function in a loop at the same time, otherwise unity will only run it in the main thread and other worker threads barely run it.

amuletgames
Автор

Very interesting dude ! I don't understand all things, but is it like multiple thread in one where it calculate one time for each instead multiple times for each ? Tell me if I'm wrong ^^
What are the situations we can use this, only for entities system ? Or also in data storage for example ?

irhjzbz