Unity DOTS - What changed?

  Рет қаралды 37,596

Code Monkey

Code Monkey

Күн бұрын

✅ Let's check out the current state of Unity DOTS/ECS and what changed in these past months.
Jobs Entities.ForEach(); [GenerateAuthoringComponent] and more!
Unity DOTS / ECS Playlist
• Unity DOTS / ECS Tutor...
Getting Started with Unity Visual Scripting
• Make games without Cod...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🤖 Join the Community Discord / discord
📦 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#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.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Facebook: / unitycodemonkey

Пікірлер: 124
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
✅ What Unity DOTS videos would you like to see? Hit the like button if you want to see more! Check out the complete Unity DOTS/ECS Playlist: kzbin.info/aero/PLzDRvYVwl53s40yP5RQXitbT--IRcHqba
@MalikenGD
@MalikenGD 4 жыл бұрын
I love your content. You are my favorite youtuber
@starburstdragon
@starburstdragon 4 жыл бұрын
I would love to see detailed explanation of transformations (3D-Unity.Mathematics) in ecs including parent-child relations, WorldToLocal and LocalToWorld matrices - that is what is missing imo - i really had hard time to understand it well since there is no good tutorials on the subject so i had to google those infos and im not sure i grasped everything. Another thing is pure ecs for example : camera in pure ecs - there is however on forums explanation - but it would be better if it is part your yt vid since you really make good tutorials. To add few things more : converting g.o. to entities, exchanging data between g.o.'s monobehaviuors and componentsystems - if possible special vids just for this etc
@Skilled37
@Skilled37 4 жыл бұрын
hi bro First you are awesome and thanks for all this tutorials. second about next DOTS Tutorials i hope you make videos for your last tutorials about Normal unity game objects (like "Awesome Top-Down Shooter in Unity (Complete Project)" for example) and convert the same project to dots With Hybrid ECS .. hope to hear your opinion.
@joepeters8746
@joepeters8746 4 жыл бұрын
Can me please help somebody? I am trying to do a double forech loop in Unity ECS within a JOB, a gravitaional like system. I have done it already succesfully with Unity 2018 ()with the help of codemonkey videos :D) with a IJOBParalleForEach, but the code didnt work with Unity 2019 so I tried it now with the new Job Entites.forech and it doesnt work either, I really have no idea why. I get the error: error DC0001: Entities.ForEach Lambda expression uses field 'physicsMasses'. Either assign the field to a local outside of the lambda expression and use that instead, or use .WithoutBurst() and .Run(). using System.Collections; using System.Collections.Generic; using UnityEngine; using Unity.Entities; using Unity.Jobs; using Unity.Transforms; using Unity.Mathematics; using Unity.Physics; using Unity.Collections; public class SwarmSystem : JobComponentSystem { public float time; public float gravK = 6.674f; EntityManager entityManager; [DeallocateOnJobCompletion] NativeArray translations; [DeallocateOnJobCompletion] NativeArray physicsMasses; protected override void OnCreate() { var v = GameObject.FindObjectOfType(); entityManager = v.entityManager; } protected override JobHandle OnUpdate(JobHandle inputDeps) { EntityQuery q = GetEntityQuery(ComponentType.ReadOnly(), ComponentType.ReadOnly(), ComponentType.ReadOnly()); time = Time.DeltaTime; translations = q.ToComponentDataArray(Allocator.TempJob); physicsMasses = q.ToComponentDataArray(Allocator.TempJob); var job = Entities.WithAll().ForEach((Entity e, ref ForceData f, in PhysicsMass pm, in Translation t ) => { for(int i = 0; i< translations.Length; i++) { float k = physicsMasses[i].InverseMass * pm.InverseMass * gravK; float3 vec = t.Value - translations[i].Value; float length = math.length(vec); float potenz = math.pow(length, 3); f.Value += (k / potenz) * vec; } }).Schedule(inputDeps); return job; } }
@c3rion
@c3rion 4 жыл бұрын
Would be great if you could do a short series about making a small game from scratch using dots.
@olier1
@olier1 4 жыл бұрын
You can do on you own
@c3rion
@c3rion 4 жыл бұрын
@@olier1 of course I could and I will. However this wouldn't answer the question of what kind of content I and apparently also some others would like to see on this channel. Some people like to watch football on TV even though they could play themselves. In addition I think it's easier to understand new concepts when put into a lager context instead of looking at them individually.
@47Mortuus
@47Mortuus 4 жыл бұрын
@@c3rion Exactly. How do you manage scenes and scene transitions in DOTS? Game managers and other static instances of classes? I've watched 10 hours of material and I'm actually STARTING to get it but I wouldn't know where to start and most importantly, how to move on.
@c3rion
@c3rion 4 жыл бұрын
@@47Mortuus Personally I would recommend sticking with a hybrid approach for now. Use DOTS where it makes sense and other methods where it doesn't. Having said that, systems should be perfectly capable of doing whatever your static instances were doing. It's mainly about the separation of data and logic. As a simple example for the scene transition use case, you could have a "SceneTransisionSystem" which checks the presence of a "TransisionToScene" component which has the scene id as the value. When found it would do the transition and remove the component from the entity.
@47Mortuus
@47Mortuus 4 жыл бұрын
@@c3rion Thank you for this helpful answer. Having only every programmed in the OOP paradigm, the very first steps are the hardest - I think rather than "converting" my current, 10k line project to DOTS, I think I'll need to build pong or something first
@nukulargames6315
@nukulargames6315 4 жыл бұрын
Regarding your ads. I don't like ads but your content is worth it. Your tutorials are great, very informative and I may have (air quotes) accidentally (end air quotes) clicked an ad or two. ;) Keep it up!
@PabloTheDolphin
@PabloTheDolphin 4 жыл бұрын
1000 times yes! More cutting edge dots videos like this! I spend hours and hours on the forums and change logs wrapping my head around what's changed then writing out code to make sense of the effects.
@mehmedcavas3069
@mehmedcavas3069 4 жыл бұрын
Please show us also methods like ontrigger or oncollision with the rigidbody physics for DOTS :)
@francoiscoetzee4353
@francoiscoetzee4353 4 жыл бұрын
You make the best DOTS tutorial, saved me hours of internet digging by simply watching this , very grateful. Would love to learn more dots physics or how to do a simple A* pathfinding tutorial using dots
@callmedeno
@callmedeno 4 жыл бұрын
Anything with complex state and interactions between entities seems to be a nightmare.
@MatthewTrecozzi
@MatthewTrecozzi 4 жыл бұрын
So excited for more dots! Would love to see a small project from scratch.
@olier1
@olier1 4 жыл бұрын
You can do on you own
@N0biKn0bi
@N0biKn0bi 4 жыл бұрын
Thank you so much for getting us started! It's kind of niche at the moment, but all so important. As we can see the shift inside of Unity moves to DOTS (see Visual Scripting) and it's a bit frustrating to get started. I didn't pick up with DOTS so far, but watching you videos every now and then will give me a better start when it's time! Greetings from Germany!
@toppefall
@toppefall 4 жыл бұрын
I think an episode on Blobs, and a conversion workflow from Scriptable Objects could be very useful.
@MaKulitStudios
@MaKulitStudios 3 жыл бұрын
I'm currently looking for this
@ShadowDarkwell
@ShadowDarkwell 4 жыл бұрын
Thank you for the update! I'm happy to hear that you will be returning to DOTs videos, as I found yours the most clear and succinct examples. A small first-person shooter game made using DOTs would be greatly appreciated!
@TsetTsyung
@TsetTsyung 4 жыл бұрын
Eek, I think I really should spend some time learning DOTS. Thank you so much for putting these vids together. I'll start going through your ECS/DOTS playlist soon. All the best ;)
@aa-xn5hc
@aa-xn5hc 4 жыл бұрын
I love these dots videos. Explain examples where it is important to use dots. Examples where it can't be used. And examples where it is not worth the effort using it.
@Sarkahn
@Sarkahn 4 жыл бұрын
Great overview! One thing though - systems have built in EntityManager and World variables, so you can just do EntityManager.whatever and World.whatever. World.DefaultGameObjectInjectionWorld is generally only meant to called from Monobehaviours, hence the name. They specifically made the name so awkward to stop people from calling it inside component systems.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Yeah good point I forgot to mention that
@aggressivemastery
@aggressivemastery 4 жыл бұрын
Thank You Code Monkey!!! Highest Quality Content here, keep it up!!! Amazing :)
@erz3030
@erz3030 4 жыл бұрын
I'd like to see a DOTS video of a few to several components interacting with each other on a large scale. Maybe some simple AI driven zombie shooter. Maybe some systems could account for number of bites or damage taken to turn into a zombie.. Maybe powerups appear based on more enemies in an area that zombie huntes AI would attempt to pick up. Maybe potential pathfinding obstacles. Or whatever else could happen to cause thousands of entities to have interactions with a bunch of different systems, all while keeping a clean game state and avoiding/pointing out possible race cases.
@CasperA
@CasperA 4 жыл бұрын
I'm starting with the URP now. It's hard to keep up with all the new technologies, I'm sure your video's will help when I want to pick up DOTS.
@emascheg
@emascheg 4 жыл бұрын
Thanks about Unity DOTS about the new changes, just waiting too for 2019.3 final for start working in a project using full DOTS, in the while watching and learning trough your videos.
@adamodimattia
@adamodimattia 4 жыл бұрын
Thank you, Code Monkey! You are my favorite youtuber as well, nobody explains stuff as clearly and concisely as you do! By the way, what is your opinion on the "game object conversion" path being taken instead of straight all-in DOTS editor? Is it just a temporary solution to get more users used to it (pun not intended) or is it something that is going to stay? Thank you once again for great content!
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
At first I thought it would be better to have a completely new editor, however now I believe they are on the right path. There's already tons of Unity content out there working with game objects and thousands of people who are already familiar with the editor. With the conversion workflow most of that knowledge will not go to waste, people can continue doing things in the editor as theyve always done and behind the scenes it all converts into super fast code.
@alexxkrehmen772
@alexxkrehmen772 4 жыл бұрын
Hi, I would like to see how to efficiently modify particles system trajectories and other data using DOTS/ECS Thanks ;)
@YouS4ckIt
@YouS4ckIt 4 жыл бұрын
Great video, thanks for that! I'd like to see some more complex content(3D) f.e. Converting a voxelworld to dots, maybe some simple game with physics for more understanding(not only moving objects)
@Wanfanel
@Wanfanel 4 жыл бұрын
In Unity there is nice ready code in Create/ECS ^_^
@kken8766
@kken8766 2 жыл бұрын
Been researching how to increase performance for my game and I come back here to rewatch this (this time really try to understand it..) The ECS looks more and more like web development(like django), where the dev will first make a database with a bunch of data tables. Then create the front end (entity), and the logic (component) of it. Which, in a sense is like breaking the whole idea of object-oriented programming apart. Cuz I thought OOC is all about having data and logic all at one class object.
@matchstick21
@matchstick21 4 жыл бұрын
FYI, the reason World.Active was renamed was people were misusing it, specifically within a ComponentSystem, and Unity devs wanted to make people rethink where they are using it. A ComponentSystem has a reference to the World it was created and running in, ComponentSystem .World, and that's what should be used instead of World.DefaultGameObjectInjectionWorld. If you need to access the world outside of a System, IE from a monobehaviour, then that is when using World.DefaultGameObjectInjectionWorld is intended (as far as I understand anyway)
@adamodimattia
@adamodimattia 4 жыл бұрын
Thank you Code Monkey!!!
@JohnnyThousand605
@JohnnyThousand605 4 жыл бұрын
What would be the best way to Instantiate/Create bullet entities (many times per second)? I was using an object pooling system (of GameObjects) to create the bullets and then ECS to move them. As that no longer works I followed your method and while the bullets appear they do not move and when I look at them in the Entity Debugger they have no components like Translation, LocalToWorld etc. One way I was thinking of is to look at creating the bullets entirely through code. Is that a viable option for something like bullets where as well as moving the bullets already on screen you're creating new ones (possibly a few dozen per second)? If I was to create them through code would you use something like an array of the different components different bullets would have (so array of sprites, array of speed values, array of damage values)?
@arsenbabaev1022
@arsenbabaev1022 3 жыл бұрын
So I can use Normal OOP scripts to spawn Prefabs and they will be converted to fast Entities? Is it ok to have mono behaviors for build or selection systems? I guess I should only avoid Duplicates of Monobehaviors?
@huyopo
@huyopo 4 жыл бұрын
I tried experimenting with DOTS physics, i even got it working like i expected, but i constantly had the feeling "the way i do it can't be right". The way i managed things like collisions just didn't feel right and it felt terribly inefective so i just scraped the project until i find better documentation. So advanced stuff in DOTS Physics would be highly appreciated.
@distortedsoulsounds
@distortedsoulsounds 4 жыл бұрын
DOTS Physics is still incredibly early. It is meant to feel like that. It needs alot of TLC and definition of best practices that just is not there yet. Your best bet is the smell test. If it works, then your good, when the version is incremented check the samples, check the changelog, and see if you can improve your code. But smell test is your best bet.
@murrayKorir
@murrayKorir 4 жыл бұрын
it would also be nice if you did some bit of 3D examples.
@jean-michel.houbre
@jean-michel.houbre 4 жыл бұрын
Do what you want, anyway your videos are great and teach me a lot.
@f11bot
@f11bot 4 жыл бұрын
We need to adapt each script to use burst compiler? Isn’t there a way to quickly adapt an old project to work with burst...?
@shubhrojyotikabiraj8322
@shubhrojyotikabiraj8322 Жыл бұрын
Hello Code Monkey, i have few questions in mind: - For all objects having 'Convert to Entity' script, is it possible to move the object by monobehaviour script? If yes, then i think it negates the purpose of ECS right? - How performant it is to add 'Convert to Entity' to static objects? Like in above case the bouncy floor (because only 'Convert to Entity' is used).
@generichuman_
@generichuman_ 4 жыл бұрын
I'm working on a chunk loading terrain using perlin noise, procedurally generated chunks, and pooling. It would be really cool to see how DOTS could optimize this. ( If you're feeling particularly adventurous, perhaps even a DOTS implementation of a marching cubes terrain with 3d perlin noise ;)
@FirstClassStar
@FirstClassStar 4 жыл бұрын
The whole thing changed in dots. What a easy iterration.
@nukulargames6315
@nukulargames6315 4 жыл бұрын
+1, DOTS physics!!
@Roadis
@Roadis 4 жыл бұрын
Uhhh I'm very early. Nice to see an Update
@rafaelcorrea7959
@rafaelcorrea7959 4 жыл бұрын
Finally they are going into the right direction, they still have a long road ahead, but at least they gave the first step.
@LukeClemens
@LukeClemens 4 жыл бұрын
I think this might be outdated already. In the documentation for com.unity.entities 0.10.0-preview6, it says: "Important: The ComponentSystem and JobComponentSystem classes, along with IJobForEach, are being phased out of the DOTS API, but have not been officially deprecated yet. Use SystemBase and Entities.ForEach instead."
@sconosciutosconosciuto2196
@sconosciutosconosciuto2196 4 жыл бұрын
More videos on Unity DOTS :D
@schaefsky
@schaefsky 4 жыл бұрын
I would also like to see a small, complete project. One more specific thing I am curetnly struggling with is AI (state management) and how and when to remove dead targets (entities) assigned to other entities. I can come up with solutions, but they always feel very clunky.
@mehmedcavas3069
@mehmedcavas3069 4 жыл бұрын
finally again ecs :3
@DigitomProductions
@DigitomProductions 4 жыл бұрын
Love these tutorials and thanks for doing them. How would you get the reference to the actual entity in this new foreach loop? It is looking like I still have to do the IJobForEachWithEntity and Execute method to get the reference to the entity and index.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Add an Entity field in the ForEach like when working with a normal ComponentSystem ForEach And if you need the index add an int field Entities.ForEach((int entityInQueryIndex, Entity entity, ref Translation translation) => { Debug.Log(entityInQueryIndex + " " + entity); })
@anonymoussloth6687
@anonymoussloth6687 3 жыл бұрын
is it possible to use the new input system with dots?
@user-ku2yl1rd8b
@user-ku2yl1rd8b 3 жыл бұрын
Awesome
@LionChannel1
@LionChannel1 4 жыл бұрын
Does code viewer already updated with these new syntax?
@JimmyDerocher
@JimmyDerocher 3 жыл бұрын
Hello! do you have any project about making a Netcode implementation for multiplayer or even MMO games? Would be awesome!
@32Bivens
@32Bivens 4 жыл бұрын
I would like to know how to set velocity correctly using dots physics. I'm setting PhysicsVelocity.Linear instead of Rigidbody.Velocity like in my old character controller, but I'm getting weird behavior. Hopefully you can touch on that in your next video.
@Deepankarsingh1993
@Deepankarsingh1993 4 жыл бұрын
With new auto conversion can we use the collider and trigger via code as we normally do with monobehaviour?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Triggers are quite different since they require writing a job to check Entity interactions but normal rigidbodies and colliders work flawlessly with the conversion system.
@FM_GOBi
@FM_GOBi 3 жыл бұрын
Hey Code Monkey, I have a question. When do you think DOTS will hit version 1, that is when will it be pretty much done? I know you don't know for sure, but I am interested in what your gut feeling tells you. I also know that people are already using it, but I am interested in the version 1.0. Given how fast the development on it has been going, are we talking 1 year, 2, 3, 4, 5?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 жыл бұрын
Initially it was meant to come out with 2020.1 so it seems they are close but it's also not mentioned on the official roadmap so apparently not that close. Given how 2020 will only have 2 TECH releases I think it might only land on 2021.1
@alword
@alword 4 жыл бұрын
What about postupdatecommand?
@In-N-Out333
@In-N-Out333 4 жыл бұрын
Have you used the incremental garbage collector yet?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Nope not yet, sounds like it could be a great feature, I've had to spend a lot of time in all my games optimizing garbage.
@billymartin6497
@billymartin6497 4 жыл бұрын
Watched your videos on transforming unity project. Installing entities was no problem, but after I installed Hybrid Renderer, UnityEngine.UI could not be found and none of my images work.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
That's strange, I've never had any issues with the UI. Check the Entities packages and look at the depencencies list to make sure all the correct versions are installed.
@iCeDrAgOn2025
@iCeDrAgOn2025 4 жыл бұрын
One thing that I have actually been looking for, and have found no real information on, is how do you send events and other messages from entities A classic example would be a power grid. you have a collection of entities that can produce power and entities that can transmit power. but if the user comes along and removed either or. there is no way that I have actually found to get the rest of the system to update. About the only thing that I can think of would be to add an empty tag.... cache the entity start concurrent jobs to balance on on either side of the removed entity, then finally remove the entity. but I don't know if that would be the best approach to take because like I said there is no way to really find out which entity was effected in the first place. All the examples I have seen have been pretty straight forward and no real point in actually using the power of DOTS for the massive parallelism and multi-threading support it offers.
@fanmanpro
@fanmanpro 4 жыл бұрын
DOTS objects synced with netcode video next please.
@taylors1545
@taylors1545 4 жыл бұрын
Could you cover blobs and streams?
@pmenown
@pmenown 4 жыл бұрын
is the idea that you build a full game in DOTS or just for large environments and use OOP for the rest?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Right now DOTS is still in preview but the goal is to get to a point where you can build almost everything in DOTS.
@jamesmillerjo
@jamesmillerjo 4 жыл бұрын
Isn't object conversion(hybrid ecs) slower than pure ecs?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Not really, the objects are converted into Entities only once. So maybe it takes 10ms longer to load and then everything works entirely in Pure ECS.
@ArnCiS96
@ArnCiS96 4 жыл бұрын
You promised to make ASTAR for DOTS
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Yup A* DOTS is certainly on the top of my priority list.
@riven7855
@riven7855 4 жыл бұрын
Thanks for you tut. Can u please explain so far what built-in components DOTs can convert?(What DOTs can do right now?) Cause i googled a lot but find nothing about 2d related things(eg.Sprite Render, SpriteSheet Animator) XD
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Right now DOTS only works with 3D objects so no 2D at all. Right now you do 2D with a Quad mesh. It works with Mesh Filter, Mesh Renderer, Colliders. But you can build your own conversion system to take a SpriteRenderer and create a Quad Mesh
@p199a
@p199a 4 жыл бұрын
1:06 code breaking changes
@turcoysa
@turcoysa 4 жыл бұрын
Hey! Can Unity convert to Entity from SpriteRenderer and RigidBody2D?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Right now DOTS only works in the 3D environment so you can't use them directly but you can make custom scripts to convert a SpriteRenderer into a MeshRenderer with a 2D Quad. Supposedly some time in the future, after DOTS is nice and stable, they will make some standard 2D tools.
@turcoysa
@turcoysa 4 жыл бұрын
@@CodeMonkeyUnity Thank you for answering!
@Istani0815
@Istani0815 4 жыл бұрын
Well i guess Wolrd.Active could be the Problem i am faceing at the moment. But my Unity dosent register a .DefaultGameObjectInjectionWorld ... One of my Problems ist that i cant read the "current" a Static Monobehavier of an Object... And some other weird links between the Monobeheavier and ECS... Probably switch back for the time beeing...
@Istani0815
@Istani0815 4 жыл бұрын
Oh Wait unit tell me version 0.1.1 of Entities is up to date, you are using 0.4.0 ... guess i have to figure out how to update
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Which unity version are you using? Entities 0.4.0 is meant to be used with 2019.3.0f4
@Istani0815
@Istani0815 4 жыл бұрын
@@CodeMonkeyUnity yeah thank i figure that out. now there are many errors that i need to fix... but most of them should be were before, now that i know them... well i try to fix it...
@siddharthtrivedi3322
@siddharthtrivedi3322 4 жыл бұрын
What is the advantage of using DOTS in game development? Rather than following a normal straight forward way because DOTS making code structure too much complex :(
@nukulargames6315
@nukulargames6315 4 жыл бұрын
Extreme performance benefits. Lower device requirements. Lower battery drain on mobile. Cooler devices, fast physics, render much much more for much much less... for starters lol
@siddharthtrivedi3322
@siddharthtrivedi3322 4 жыл бұрын
@@nukulargames6315 But coding using DOTS structure is too complex to understand as well and implement too....
@aquaarmour4924
@aquaarmour4924 4 жыл бұрын
@@siddharthtrivedi3322 idk what more you want. He perfectly answered your question. He can't do anything about it being too complex.
@siddharthtrivedi3322
@siddharthtrivedi3322 4 жыл бұрын
@@aquaarmour4924 No I expect nothing from him :) I appreciate his reply too but overall I want to say that Unity made this thing a little bit complex to understand.
@iCeDrAgOn2025
@iCeDrAgOn2025 4 жыл бұрын
@@siddharthtrivedi3322 They really didn't make it more complex. What it is, is a different way of thinking about things. GameObjects What we know now, contain both data and logic. Where as with DOTS that is broken up in to components and systems. An Entity is a collection of components and Components represent the data of the entity, and the systems work on and or use that data which is provided by the components. This way you can rewrite reusable systems for example, a movement system and plug in different entities that get their input from different sources, and the input system would still act the same regardless if the input came from a controller, a keyboard, someone on a remote system on the internet or even an AI
@odo432
@odo432 3 жыл бұрын
"Supposed to come out of preview in just a couple of months". I think you mean years. Unity has seemed to of slowed down considerably with DOTS unfortunately. I've been reading sometime in 2021 or 2022 it will be production ready.
@vinhlam1401
@vinhlam1401 2 жыл бұрын
Hi my teacher, do you have any game online tutorials :D
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
You mean multiplayer? Nope I haven't covered that topic yet
@vinhlam1401
@vinhlam1401 2 жыл бұрын
@@CodeMonkeyUnity thank you my teacher, did you have any tutorial how to set up screen size mobile and PC game, auto fix to size of any screen in 1 game in unity, thank you
@edysmith4798
@edysmith4798 4 жыл бұрын
First
@michalbilinski4168
@michalbilinski4168 4 жыл бұрын
Dude, Srsly Im gonna donate you next salary
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Thanks! Glad you find the videos helpful!
@michalbilinski4168
@michalbilinski4168 4 жыл бұрын
Code Monkey Usually I don’t like videos to learn stuff, but you’re always on point, short and entertaining! I’m a junior unity dev and your videos help me to go for more unity knowledge, giving me solid introduction to a topic - I often rewatch your videos I have to thank you
@justinwhite2725
@justinwhite2725 4 жыл бұрын
This can't be correct. Entities.foreach doesn't pass the index of an entity, which makes it unusable in a concurrent way. I don't think this is asynchronous the way job component systems are supposed to be. This seems like the syntax for a (non-job) component system. EDIT: You have to name the int entityInQueryIndex and then it works.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
What isn't correct? You only need entityInQueryIndex when doing things with the EntityCommandBuffer, if you're just modifying components there's no need for an index. This code is running on all threads Entities.ForEach((ref Translation translation) => { for (int i = 0; i < 10000; i++) { translation.Value += float3.zero; } }).Schedule(inputDeps);
@justinwhite2725
@justinwhite2725 4 жыл бұрын
@@CodeMonkeyUnity yes, exactly. I was under the impression that without the ability to gain an index that it was running on the main thread, and therefore had nothing to do with jobs. I wasn't able to get an index until I realised to name it very specifically. I was therefore under the impression that because it isn't actually using concurrent jobs that this wasn't a correct replacement for the old way of doing it. But as I said in my edit - nevermind, it comes down to needing to name the int in a very specific way. I'm still having weirdness in any command buffer system doing it this way - to the point where I'm not not using command buffers at all in job systems anymore and creating other (non-job) systems to handle those cases.
@user-pi3fn7eq6q
@user-pi3fn7eq6q 4 жыл бұрын
why "NativeQueue"? why not "System.Collections.Concurrent"
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
Because it's a special type of struct based collection meant to work with the Job System and the Burst Compiler.
@user-pi3fn7eq6q
@user-pi3fn7eq6q 4 жыл бұрын
@@CodeMonkeyUnity OK THX
@felipemmax
@felipemmax 4 жыл бұрын
I do understand why DOTS is important, but man... I feel like Unity forgot their simplicity. Everything in Unity is getting so complicated.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
It's not necessarily complicated, it's just a different way of doing things. If you wrote Data Oriented code for a long time then going OOP would seem very strange. Just keep at it and when it clicks it all becomes so much easier.
@jmitchell2464
@jmitchell2464 4 жыл бұрын
5 ads for 13min video
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
I've been providing hundreds of hours of excellent teaching content for free by burning through my savings and the only way I'll be able to continue doing it long term is if this becomes sustainable. If you enjoy the content feel free to support on Patreon and turn on AdBlock.
@jmitchell2464
@jmitchell2464 4 жыл бұрын
@@CodeMonkeyUnity I definitely understand you have great content I'll become a patreon to support
@daslolo
@daslolo 4 жыл бұрын
this video should be titled "how many commercials can you pack in a 40 minutes video"
@CodeMonkeyUnity
@CodeMonkeyUnity 4 жыл бұрын
I've been providing hundreds of hours of excellent teaching content for free by burning through my savings and the only way I'll be able to continue doing it long term is if this becomes sustainable. If you enjoy the content feel free to support on Patreon and turn on AdBlock.
@daslolo
@daslolo 4 жыл бұрын
put the ad in the middle - that's how you do it kzbin.info/www/bejne/npW7qoh-gN6JpNE
@matteocampo1732
@matteocampo1732 4 жыл бұрын
@@CodeMonkeyUnity producing things for free is not enough for people. They want it also adfee! How convenient!
@aquaarmour4924
@aquaarmour4924 4 жыл бұрын
If you aren't satisfied with the quality of this video, you are always free to make your own so that it meets your unrealistic standards.
@daslolo
@daslolo 4 жыл бұрын
off topic
@superjaykramer
@superjaykramer 4 жыл бұрын
COMPLETE CRAP.......IF YOU DON"T BELIEVE ASK WHAT YOU WANT.
Pathfinding in Unity DOTS! (Insane Speed!!!)
24:56
Code Monkey
Рет қаралды 129 М.
Getting Started with Unity DOTS Physics
20:59
Code Monkey
Рет қаралды 90 М.
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
How to Start Gamedev in 2024
10:28
Sasquatch B Studios
Рет қаралды 356 М.
Unity Vector3.Cross Visualized
1:36
Tarodev
Рет қаралды 58 М.
Dynamic Buffers in Unity DOTS (Array, List)
18:24
Code Monkey
Рет қаралды 27 М.
Unity DOTS FINALLY fully released! (and tons more! Unity 2022 LTS)
10:13
Making a Spaceship in 1 hour vs 10 hours vs 100 hours
22:18
Polyfjord
Рет қаралды 797 М.
Should You Use DOTS in 2024? (plus what is Unity ECS)
30:15
Turbo Makes Games
Рет қаралды 34 М.
What are Subscenes in Unity? (Massive Worlds!)
15:51
Code Monkey
Рет қаралды 94 М.
How to Become a Game Designer
15:08
Game Maker's Toolkit
Рет қаралды 1 МЛН
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17