Find Target with ECS and the Unity Job System

preview_player
Показать описание
👍 Learn to make awesome games step-by-step from start to finish.
Let's Find the Closest Target with ECS and the Job System to boost our Scene Speed 100x!

Find Target in Unity ECS

Unity ECS Tutorials

If you have any questions post them in the comments and I'll do my best to answer them.

See you next time!

#unitytutorial #unity3d #unity2d

--------------------------------------------------------------------

Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

--------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

This continues the previous video which was doing everything in a simple ComponentSystem, here you see the insane benefit you get from Jobs + Burst!

CodeMonkeyUnity
Автор

Uow, burst is magic! It's literally throwing it in our faces that slow applications is not caused by user's old computers, actually by bad developers or engines.
You explained very well, from now on I suppose that using burst + job system will be more a parallel logic challenge than a code syntax learning. Also array abstraction to allow job system usage.
For example, I was thinking in case that a target entity must be assigned to only one unit entity (the closest one in fact), it turns to a common threading problems and making burst impossible to use perhaps.

farpini
Автор

Just awesome - finally I see the beauty of C# in a crash course of yours. Really impressive!
Keep up your awesome work man! ;D

cognos
Автор

Its SOO tempting to want to use ECS to run soo many units and not just a few units you can achieve with previous versions of unity.

micaiahstevens
Автор

Thanks again for your awesome videos ! I bought your game bundle :D

nemosisstudios
Автор

Fantastic video, so great and comprehensive. Keep it up!

adamodimattia
Автор

The big thing you could improve is not to calculate square root with distance, because you don't need it.

AramilAnakir
Автор

ComponentSystem and IJobForEach being phased out of DOTS API now, you're supposed to use SystemBase and Entites.ForEach instead now.

AwfulPun
Автор

What I am thinking about Data Oriented Design is that it makes projects architecture designing went redudent. Instead you just have to follow simple protocol of implementatin jobs systems and jobs data, passing data flow from systems downward to device output. What are the downsides of it? Technically it is x1000 performance boost. If it isn't an issue somehow for you - you will be pleased.

dadlord
Автор

Can u have specific tutorial for specific subjects like entity query, quadrant system, native has map and hash list and their use case, i u do it we will be very glade, thanks.

armingaming
Автор

At 2:03 in the video, the UnitMoveToTargetSystem is using GetComponentData(). The manual says: "this lookup method results in a slower, indirect memory access. When possible, organize your data to minimize the need for indirect lookups." Is there a more efficient way to fetch the target entity position, or this just a necessary evil when building a targeting system?

LukeClemens
Автор

Wow, that escalated quickly, up until this video, ECS seemed very easy but I feel scared now after watching this. We need to seperate jobs which use burst and not, also dealing with this command buffer seems complicated. Now gonna try on my own the last version to understand it better. Thanks a lot Code Monkey for these great explanations.

hakanviajando
Автор

Can you make a tutorial about how to create Clicker game in unity please ?
I can't find any good tutorial about this topic any where

ahmedthebest
Автор

By creating this struct at 5:00 you don't kill the whole SIMD optimization that Brust provides?

LageAfonso
Автор

You should upload more ECS tutorials now that 2019.3 is out. It would be really nice since LocalToWorld is deprecated. Also you should make a video about ECS and rendering 3d meshes/animations.

kingnoah
Автор

Any suggestions for doing something similar with a hybrid approach? I can get game objects to entities, but I need to pass the closest target back to a monobehaviour or other class in some way. I can't figure out a good way to link it without using something like a hashmap to keep track of all objects and do a lookup after the job is done, , and I don't like that. Any suggestions are welcome :) This video is great, but I'm not ready to go pure ECS yet.

Gildar
Автор

As I know from C++ it is a bit faster to use constructors instead of alter initialization of fields. Because otherwise we allow to construct field with default values, what already invokes allocation, and later we reallocating fields again. But maybe C# has compile time optimization for it, I don't know.

dadlord
Автор

Is it possible to make NavMesh agents into entities? I'm trying to wrap my head around a real world application of the job systems for projects that I may be working on.

SteveTheExploiter
Автор

The performance improvements are nice and you are doing a great job explaining all of this! However the amount of code required is absolutely insane. And that's just for such a simple system! Of course that isn't your fault at all @Code Monkey, it's up to Unity to fix this madness.

FelheartX
Автор

Can you tell more about how differs from the normal one? When is it required?

saintangels