Find Target in Unity ECS

preview_player
Показать описание
👍 Learn to make awesome games step-by-step from start to finish.
Let's see how we can Find the Closest Target in a Pure Unity ECS game.

Getting Started with ECS in Unity 2019

Unity DOTS Explained

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.

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

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

The next video will cover how to use the JobComponentSystem + Burst to get 1000 units looking through 1000 targets in just 2ms!

CodeMonkeyUnity
Автор

The most perfect ECS series on YT. Keep going with the great job!

ramonmelofpv
Автор

YESSS! Thanks!


When at the end of the video you said we should do this, I was expecting a mere "but we won't" as if you were just listing what SHOULD be done so I was gonna comment oh please show us but oh was I delighted that it's actually already scheduled. Cool! :D

jeromej.
Автор

when ECS came out I was freaked out because of the unknown. Now since I worked in a lot of projects and gained some experiences I could understand how resourceful ECS is, though I'm still in the don't know where to start about ECS but I'll learning about it from this channel.

dreamingacacia
Автор

Loving these tutorials!
Pls do one on collisions and animation in ecs

pinguisop
Автор

Thank you so much for these tutorials, I almost never comment/like/subscribe on youtube videos but these are really amazing! Keep up the amazing job!

martinkutlak
Автор

thank you for this series! everything I find on ecs is high level, its so hard to find actual implementation. I'm using php but this was still incredibly helpful!

NitroxNova
Автор

Nice tutorial video. One comment: World.Active.EntityManager is superfluous you can simpy use EntityManager which is a property on each System.

joachimante
Автор

Thank you so much your tutorials are the best

NaruHinn
Автор

Am still wrapping my head around the DOTS system and I think am beginning to get it. Nevertheless I have a suggestion(you don't necessarily have to do it, it is just a suggestion): Do a tutorial that covers all three components of the DOTS system implementing movement and rotation, physics(such as rigidbody and collisions), and animations.

lemetamax
Автор

YES! can hardly wait for jobifying this and adding physics!... Jobify?... Job-if-y... using the complete DOTS

johnbaker
Автор

thank you so much for these tutorials!!

riadsaad
Автор

I would use closestDistance temp variable instead of closestTargetPosition and set it to float.maxValue. then you do not need if else and double math.distance.

Micz
Автор

Thanks for your effort and share your knowledge with us Code Monkey!!!

multimediahighway
Автор

Can you show how to make collision/physics with ECS?

felipemmax
Автор

Calculating a squareroot twice in a nested loop. (by wich one isnt really necessary and the other is really not necessary) excellent idea! xD

NachoMan
Автор

So this is basically about how to work with Entities on the main thread. it actually seems to be pretty simple way to organize invocation of tasks. It solves "trouble" of complicated relations in code, to me. Systems just picking up entities that are match to the list of ComponentData types. it might be a heavy thing for heap allocated objects, but with ECS architecture it is not a legit overhead.

dadlord
Автор

Not sure if I made an error somewhere but I also had to add the checking to the "HasTargetDebug" ComponentSystem to make it work.

collierapgar
Автор

Lol when they both go towards the same target

Zvrra
Автор

Perfect! I want next video soon! Questions: 1) Is there a way to set the systems execution order? 2) Is it possible and it would not be more organized to create archetypes with particular components (HasTarget, Unit..) instead of using WithAll and WithNone in order to cycle the entities?

farpini