What an Entity REALLY is in Unity ECS - Unity DOTS 2022

  Рет қаралды 5,611

Turbo Makes Games

Turbo Makes Games

Күн бұрын

💬 Join our Discord community: tmg.dev/Discord 💬
🔴 Live Training Replay: tmg.dev/oop-habits 🔴
💻 My Game Development Setup: tmg.dev/GameDevPC 💻
📸 My Camera Gear: tmg.dev/CameraGear 📸
🎮 Let me know what other topics you want to learn about 🎮
⌚ Time stamps for key topics ⌚
- 0:00 - Entities in Unity ECS
- 0:32 - What is an Entity?
- 2:08 - Entity Index Property
- 2:59 - Index Recycling & Entity Versions
- 5:24 - Max Number of Entities Per Chunk
- 6:34 - Wrap-up and Final Thoughts
🌐 Find Me Online! 🌐
📄 Blog: tmg.dev
👨‍💻 GitHub: github.com/JohnnyTurbo
🎮 Games: johnnyturbo.itch.io/
🦅 Twitter: / turbomakesgames
📺 Twitch: / turbomakesgames
🎵 Music by: Joakim Karud / joakimkarud
#️⃣ #GameDevelopment #UnityECS #Entities

Пікірлер: 41
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Had a ton of fun making this video about entities - a pivotal part of the entity component system model. Let me know if you have any other questions about entities! Also, what do you think of the new set??? 😲😲
@rocksfire4390
@rocksfire4390 2 жыл бұрын
MmMmm ECS content. can't wait when we all get our hands on the new version.
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Same here! I'm so excited 😀
@HachikoTanuki
@HachikoTanuki 2 жыл бұрын
Your video and content quality is neat! A cool project that I'm always following from afar.
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Glad to hear this! Thanks for stopping by 😊
@wildwestdrift700
@wildwestdrift700 2 жыл бұрын
I like the new background!!
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Yoo thanks homie!!
@chadfranklin47
@chadfranklin47 2 жыл бұрын
Great video, can't wait for ECS 0.5!
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Thanks! I'm excited 😁😁
@El_Beat
@El_Beat 2 жыл бұрын
Nice explanation. Suscribed
@TurboMakesGames
@TurboMakesGames Жыл бұрын
Glad you enjoyed, welcome!!
@pedrodesanti6266
@pedrodesanti6266 2 жыл бұрын
Great, thanks for this video
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Sure thing, glad it was helpful!
@chris.davidoff
@chris.davidoff 2 жыл бұрын
I still can't get my head around the chunk thing, but this is was very enlightening, thank you! That versioning thing makes so much sense to do! I had no idea about that. I'm going to do it for my multiplayer code :)
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Don't worry if you don't understand chunks right now, I'll have a video up on them soon enough 😊
@_ironrose
@_ironrose 2 жыл бұрын
Great video! Also, Is job system a Unity replacement for c#'s async/await ?
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Thanks! Good question, although there are similarities between the two, I wouldn't call it a replacement. Mainly because jobs are typically meant to be short lived, while async operations are designed to be ran over longer periods of time. Though this does bring up some interesting topics for future videos...
@diliupg
@diliupg 2 жыл бұрын
nice trivia.
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
😁😁
@user-vw2sb6wi2m
@user-vw2sb6wi2m 2 жыл бұрын
ECS is great technology! Will I use it? No way!
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Hah! It's fun for sure, but not for everyone - especially right now. Thanks for stopping by!
@TheNbc27
@TheNbc27 2 жыл бұрын
Hey! I have another unity question. I'm not sure if you only do entities but I figured you gotta ask somewhere. Where would I go to learn about implementing an in game store features for skins. Really just dealing with player skins in general I am currently doing. I really want it to be super similar to how Crossy Road has it implemented. Where the player skins are lined up whether it be vertically or horizontally and as you scroll through the different skins they become larger. Any help would be greatly appreciated!
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Sounds like there are two problems you actually need to solve for here - the first is dealing with all the actual skins, being able to dynamically load in the ones the player has unlocked or purchased, then applying them to the player in the game; the second is creating a UI for the selection screen. To solve the first problem, look into Unity's addressables system. This allows you to load in assets from local on the device or from the internet (though a CDN service). Once loaded into the game, you can display them to the player and set it as the active skin. The UI for the selection screen can be built out using many of the standard UI components built into Unity. There are things like scroll bars and buttons to allow you to cycle through the skins. You'll have to do a bit of coding on your own to get everything to cycle through nicely and have the skin scale up/down as it moves on the screen. Hope that gets you going in the right direction!
@TheNbc27
@TheNbc27 2 жыл бұрын
@@TurboMakesGames Awesome, I will definitely look into that. Thank you very much!
@TheNbc27
@TheNbc27 2 жыл бұрын
@@TurboMakesGames Sorry, I hate that I feel like I bombard you with questions lol. I'm getting into addressables and everything is going as planned. I however am wondering if I've engaged in some bad coding practices that will force me to kind of recode pretty much my whole PlayerController. Or I guess migrate it over to the GameManager. I have a PlayerController script and a GameManager script as standard. In my PlayerController script I have included stuff like the fuel bar, tracking when the engine should shut off due to lack of fuel, adding fuel, audio sources, particles, etc. As of right now I am creating each of the different skins to store as prefabs w/ particles and sound to call as the addressable. I have no idea how it will interact with calling a prefab that includes a player controller script. How will the public audio sources react upon being called. Will I have to move all of these things over to the GameManager script? Or do I need to make them private and initialize them in the start method? I am backing up my file daily because I feel like I'm one click away from a catastrophic failure lol. I really appreciate any and all help! EDIT: To try to consolidate, I understand the difference between public and private variables. I just dont have any idea how fundamentally a script reacts upon getting called. If I create the game object essentially, and initialize all the public variables then create a prefab of that game object. Will I get a bunch of null reference exceptions when that object is loaded. Or will it react more so how I imagine/assume and it will be created as it was copied.
@NewbNinjas
@NewbNinjas 3 күн бұрын
"Actually I guess technically, the worst case scenario would be that your entities do not fit in chunks at all ... uhm which means that you probably have some bigger problems on your hands ... hu hu hu" ..... Classic :D
@Nullzero98
@Nullzero98 2 жыл бұрын
Just been browsing your videos and learning the basics of ECS/DOTS. I get that the data is separate from the processing, and that you can mark entities with tags, etc. But what I don't understand is how all that separate entity data is fed into unity's rendering engine. The data and physics are completely separate from Unity... so is that data just copied over at some point and given a shader? How flexible are those render settings?
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
Everything is still being compiled and controlled by Unity. The separation really just means that the stored data and the data transformations aren't taking place in the same files and chunks of memory. For rendering, ECS uses the Hybrid Renderer package to render entities which can be used with the existing render pipelines. Hope that helps you out, let me know if you still have any questions
@Nullzero98
@Nullzero98 2 жыл бұрын
@@TurboMakesGames that clears it up! Thanks so much, I’ll keep looking into it!
@diliupg
@diliupg 2 жыл бұрын
@@TurboMakesGames By the time Unity settles down with this system, Unreal Engine will be coming up with newer ideas evolving nanites. So disappointing.
@vector_space
@vector_space 2 жыл бұрын
Could you list some of the other things in Unity that use a versioning number?
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
A lot of times it is used to detect changes in things. So when a data component is opened for write access, the version number increments, then if a system uses something like a change filter, it can compare the previous version with the current version. If the current version is higher than the previous, then it knows it has changed. Again, I would like to make a video going more in depth on this 👍
@jorge1680
@jorge1680 2 жыл бұрын
Addressables, it doesn’t come installed out the box but if you install it and use it to say… update assets from the web, it will compare the web version and the locally cached version to decide whether it should download it or not
@Tetro48
@Tetro48 2 жыл бұрын
I'm developing Entity-based internal block stacking engine. It can internally handle 10000 players in my 4 core laptop at 120+ updates per second, but how you render those 10k players is another question. Do you render those with a texture, raw Graphics drawing, or something?
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
The hybrid renderer package has worked well for me to render many thousands of meshes. Depending on your performance, maybe you do need to build out something custom. Will take some testing to figure out the best solution to your project. All the best with your project though, feel free to share your progress with us on Discord - tmg.dev/Discord
@a.david.s
@a.david.s 2 жыл бұрын
ECS is very confusing and difficult to use, many of documentation i've found changes to much between ECS versions
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
It has a steep learning curve for sure, however things start to fall together once you understand the major concepts and the quirks of working with Unity's ECS. The current version of ECS has been out for over a year now and the next version is set to come out soon - while I expect some breaking changes, I know the API is becoming less susceptible to change. If your project needs it, then it's worth it to go through the challenges of working with an experimental package. Cheers!
@a.david.s
@a.david.s 2 жыл бұрын
@@TurboMakesGames I guess it will come with a bunch of changes
@Tetro48
@Tetro48 2 жыл бұрын
In my case, Entities broke on both Unity 2020 and 2021 with exactly 165 errors. I hope v0.50 will fix it. EDIT: Oh wait, upgrading packages critical to Entities will break it. so that's why. Burst can be updated without breaking Entities.
@TurboMakesGames
@TurboMakesGames 2 жыл бұрын
I would expect some breaking changes going from Entities 0.17 to 0.50 depending on what you're using in the API. However better compatibility is coming. Hope you get all the errors sorted out soon!
@Tetro48
@Tetro48 2 жыл бұрын
@@TurboMakesGames Those 165 errors might've come from newer Unity Jobs or Collections version on a project with v0.17 Entities.
How to Upgrade to Hybrid Renderer Version 2 - Unity DOTS Tutorial 2022
6:19
Unity ECS: Click to Select Units - Unity DOTS Tutorial [ECS Ver. 0.17]
19:40
100❤️ #shorts #construction #mizumayuuki
00:18
MY💝No War🤝
Рет қаралды 20 МЛН
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 53 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 121 МЛН
Chunks! Where Unity ECS Data is Stored - Unity DOTS 2022
9:27
Turbo Makes Games
Рет қаралды 4,9 М.
How to Use SINGLETONS in Unity ECS - Unity DOTS Tutorial [ECS Ver. 0.17]
8:57
Alien Megastructure Candidates - Not as Crazy as it Sounds!
6:29
Sabine Hossenfelder
Рет қаралды 147 М.
Minimax: How Computers Play Games
14:37
Spanning Tree
Рет қаралды 191 М.
How to Create a New Unity DOTS/ECS Project in 2022 - Entities 0.50
11:38
Turbo Makes Games
Рет қаралды 31 М.
When to use Entity Command Buffer in Unity ECS - [Unity DOTS]
11:53
The Hot Path Show Clips
Рет қаралды 1,2 М.
100❤️ #shorts #construction #mizumayuuki
00:18
MY💝No War🤝
Рет қаралды 20 МЛН