Watch this if you've never tried JOBS in Unity (Tutorial)

  Рет қаралды 3,500

Sasquatch B Studios

Sasquatch B Studios

Күн бұрын

Show your Support & Get Exclusive Benefits on Patreon (Including Access to this tutorial Source Files + Code) - / sasquatchbgames
Join our Discord Community! - / discord
--
JOBS are incredibly easy to schedule and can double (or sometimes more) your FPS depending on your use case. This system allows you to code safe-multi-threaded code for your games.
I hope you enjoy!
--
Timestamps:
00:00 - Introduction
00:21 - Scene explanation
01:03 - optimizing the enemy movement into a manager
02:28 - JOBS explanation and setup
03:36 - Setting up the JOBS struct
06:51 - Scheduling a JOB
08:33 - Using IJob and getting data from Job
---
In need of more Unity Assets? Using our affiliate link is a great way to support us. We get a small cut that helps keep us up and running: assetstore.unity.com/?aid=110...
---
Looking for some awesome Gamedev merch? - sasquatchbgames.myspreadshop....
---
Who We Are-------------------------------------
If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making our game, Samurado.
Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!
Wishlist Samurado!
store.steampowered.com/app/23...
Follow us on Twitter for regular updates!
/ sasquatchbgames
#unitytutorial #unity2d #unity3d

Пікірлер: 22
@naolshow
@naolshow 20 күн бұрын
The overhead at the end is not from job side, you are not disposing the rotation native array. And also you should not allocate and dispose the arrays each time since you are using the Persistent allocator, so either keep their reference by creating them at awake and disposing them in on destroy or simply allocate them and dispose them in update with a temporary allocator.
@majin2909
@majin2909 19 күн бұрын
I know you since 1k subs, I am glad u didn't gave up and are that far on youtube, hope you are making a good living now, at least good enough to survive
@RobLang
@RobLang 20 күн бұрын
Really cool overview. Really appreciated the look at 15,000 individual jobs because I think the overhead would catch many out!
@b5fan504
@b5fan504 8 күн бұрын
A good video. I suspect some people may benefit from clarity that, essentially, every time you say 'thread' you could say 'core'. That's what you're allowing here; to spread more work across more CPU cores. I also like that you touched on their being no free lunch; it comes with its own overhead as everything does.
@janseenvideogaming
@janseenvideogaming 18 күн бұрын
Okay.. Im going to give this another shot. I need to start showing viewers how to make cool games and get more viewers. tough. Great video man
@TheArghnono
@TheArghnono 20 күн бұрын
Excellent tutorial!
@OIndieGabo
@OIndieGabo 19 күн бұрын
Just to add my take on "why 2 libraries for Jobs exist" and also why we keep seeing libraries (namespaces) with the same name. I am not sure if this is exactly the case but the JOBS library is an isolated solution. It might not necesserally been written to work solely for the UnityEngine. It is a solution on multithreading in a specific scenario. So you have the solution "Unity/Jobs" (using slashs so youtube does not mistake it with a link). It contains everything to make Jobs work. And then you need an implematation that actually takes advantage of that system and applies its usage in the way it needs to its own solution. That's why you have the "UnityEngine/Jobs". It is basically the UnityEngine having an implementation on how to use the Jobs library, wich happens to be made by Unity (the company).
@user-uk9er5vw4c
@user-uk9er5vw4c 4 күн бұрын
nice content, thanks!
@AlexHosseini
@AlexHosseini 20 күн бұрын
Oh boi that was a nice explanation.
@danielwertz8724
@danielwertz8724 20 күн бұрын
Im a godot developer but love your videos. Feel like i still got a little out of it. Helps that I use c# in my day job and use threading frequently. Thanks for the vid!
@Dragoncro0wn
@Dragoncro0wn 20 күн бұрын
Is it a bad idea to make the thread function like an update loop? Always running in the background doing its own tasks
@PhiLudo
@PhiLudo 20 күн бұрын
cool stuff
@redragon1229
@redragon1229 20 күн бұрын
Cool video. I want to point out that although the ~x2 boost in your example does not look that impressive, actually, excluding rendering and other processes, Jobs can be HUNDREDS of times faster than the same single-threaded calculations. In this example the difference is not so significant because, I think, most of the performance hit is the rendering. Also, as @naolshow pointed out: this can be further optimized.
@user-rm2pj9jf8s
@user-rm2pj9jf8s 20 күн бұрын
I love it
@privatdetektivenkant5975
@privatdetektivenkant5975 20 күн бұрын
Give me more!!!!!
@Coco-gg5vp
@Coco-gg5vp 20 күн бұрын
First
@GostGostcic
@GostGostcic 19 күн бұрын
this video is so bad, he could make this code 10x faster with jobs but he made so many mistakes in the video lol
@OIndieGabo
@OIndieGabo 19 күн бұрын
This comment means nothing if you are not pointing out how the solution would actually be improved. There is no harm on pointing mistakes out and explaining them so everybody can grow on it. What you did here is just offensive. And if this is was your intention it becomes clear why we should not listen to what you are saying and just ignore you in the future.
@GostGostcic
@GostGostcic 18 күн бұрын
@@OIndieGabo [ReadOnly] works only on native containers not the normal variables, boid Transforms should have null parent (this is extremely important) and updated only with TransformAccess.SetLocalPositionAndRotation(...), then he should show profiler because this is not the bottleneck (because can handle 100k+ updates per frame easily), he is doing something else wrong. i could go on... but the point is, dont watch this, he is missing the point of the JOBS and what they do.
@ehabelbwab1783
@ehabelbwab1783 2 күн бұрын
@@OIndieGabo Agree
Make a MiniMap with NO CODE (Unity Tutorial)
8:46
Sasquatch B Studios
Рет қаралды 1,6 М.
THIS is Why Most Indie Games Fail
7:36
Sasquatch B Studios
Рет қаралды 24 М.
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 6 МЛН
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 58 МЛН
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 154 М.
The Unity HACK that the PROS know
21:27
git-amend
Рет қаралды 10 М.
My Wife and I Made an Indie Game and it Made Millions!
14:45
Eastshade Studios
Рет қаралды 974 М.
The LIES You've Been Told About Gamedev
9:41
Sasquatch B Studios
Рет қаралды 9 М.
CLEAN Game Architecture with ScriptableObjects | Unity Tutorial
13:12
Sasquatch B Studios
Рет қаралды 9 М.
SPEED UP Your game development with these 10 TOOLS! (Unity)
13:25
Sasquatch B Studios
Рет қаралды 7 М.
How I Would Start Gamedev (if I had to start over)
9:02
Sasquatch B Studios
Рет қаралды 11 М.
Unity Job System - A Practical Code Example
13:50
Infallible Code
Рет қаралды 80 М.
Unity DOTS vs Handbuilt: Sample Project
27:56
Nick Caston
Рет қаралды 674 М.
Skibidi Toilet vs Camera man  #skibiditoilet  #Cameraman #youtubeshorts #funny T-68
0:27
Fomdys Animation Studios
Рет қаралды 9 МЛН
ONE MORE SUBSCRIBER FOR 6 MILLION!
0:38
Horror Skunx
Рет қаралды 15 МЛН
Cars VS King Kong 🚗 | BeamNG.drive #shorts
0:57
DriveTrickX
Рет қаралды 73 МЛН
Escape Nextbots Rosalia And Obunga Police #gmod
0:36
BizarroTube GMod
Рет қаралды 19 МЛН