Тёмный

System State Components in Unity ECS - Unity DOTS Tutorial [ECS Ver. 0.17] 

Turbo Makes Games
Подписаться 26 тыс.
Просмотров 4,5 тыс.
50% 1

❗❗ Caution: This video was made with an older version of ECS. See pinned comment for further Details ❗❗
📌 Download the full project files: tmg.dev/SystemStateComponents 📌
👨‍💻 Code/Scripts from this video: tmg.dev/SystemStateComponents... 👨‍💻
💬 Come chat with other DOTS/ECS devs: tmg.dev/Discord 💬
🚧 Resources Mentioned 🚧
System State Components Forum Post: forum.unity.com/threads/syste...
💻 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 - What Are System State Components?
- 2:06 - When to Use System State Components?
- 3:07 - How to Use System State Components
- 5:14 - [Tutorial] Project Overview
- 6:40 - [Tutorial] Creating a System State Component
- 7:35 - [Tutorial] Spawning and Moving Capsules
- 8:55 - [Tutorial] Adding System State Components
- 9:41 - [Tutorial] Updating System State Components
- 11:46 - [Tutorial] Cleanup and Remove System State Components
- 12:45 - Final Demonstration
- 13:19 - 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
#️⃣ #UnityDOTS #UnityECS #MadeWithUnity

Опубликовано:

 

7 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@TurboMakesGames
@TurboMakesGames Год назад
❗❗ *Caution:* This video was made using an older version of Unity ECS. While the core concepts remain the same, some of the API and workflows have changed as of ECS version 1.0. I would recommend checking out my ECS 1.0 tutorial video for a good overview of the latest standards for Unity’s DOTS: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-IO6_6Y_YUdE.html Once again, the theory behind the concepts of this video are still relevant, however the API has changed. Stay tuned for further updated videos on this subject. Please let me know if you have any questions either here or in our Discord community: tmg.dev/Discord
@TurboMakesGames
@TurboMakesGames 2 года назад
What have you used System State Components for? Do you plan on using them for anything in current or upcoming projects?
@supersmartio240
@supersmartio240 2 года назад
Thank you for explaining this topic! I was not completely sure how they worked.
@TurboMakesGames
@TurboMakesGames 2 года назад
Awesome, glad to hear this helped you grasp the topic 😊
@CodemasterJamal
@CodemasterJamal 2 года назад
Dude, this is awesome.
@TurboMakesGames
@TurboMakesGames 2 года назад
Appreciate it man!! Glad you enjoyed
@bqdqb6382
@bqdqb6382 2 года назад
Hi, Thanks for your excellent DOTS tutorials! would you make a tutorial about Unity.Animation (Dots Animation)?
@TurboMakesGames
@TurboMakesGames 2 года назад
Glad you've been enjoying! Animation in DOTS is something that's been heavily requested so I'd definitely like to get some videos out on it sometime soon
@Marcusaralius76
@Marcusaralius76 2 года назад
That's interesting! I may have a use for them. I'm building an RTS with automated armies. The armies use a trigger sphere to detect enemies, allies, terrain features, etc. But they won't work, because I need a collider to mark the army for others to find. Unity DOTS Physics has this weird quirk where if a Physics body has two shapes on it at once, it will register two events, so I'll need to have "detection" trigger collider on a separate entity. Would this work for that?
@TurboMakesGames
@TurboMakesGames 2 года назад
So basically the issue is that you're getting two events from the two colliders, so the solution is to have a separate entity with the detection trigger so you only get the collision events on the main army's entity? Don't think you'd necessarily _need_ to use a system state component for this, but it could definitely work well for that use case. Thanks for sharing! BTW, feel free to share what you're working on over in our Discord community if you'd like - tmg.dev/Discord
@Alperic27
@Alperic27 2 года назад
think it would be more of a hack than a efficient use of the sys.st.cmp
@OmerFarukGonen
@OmerFarukGonen 9 месяцев назад
Is removing every component from an Entity, destroys the Entity? Since we didn't destroyed the capsule entity after we removed ShadowState data. Maybe because the MoveCapsuleSystem will Destory it in the next Frame?
@TurboMakesGames
@TurboMakesGames 9 месяцев назад
Good question - in general, removing all components from an entity will NOT destroy the entity by default. This is because you can have "empty" entities that do not have any components associated with them (different than GameObjects where each of them are all guaranteed to have at least a Transform component). Where this changes is when this comes to what are now known as "cleanup components" (called system state components in this video) where you first need to call "destroy entity" on the entity, but the entity will still exist with ONLY the cleanup components on it. To fully destroy the entity, you'll just need to remove the cleanup components from that entity. Depending on how you implement these steps, this could happen all in one frame or over the course of many frames. Hope that answers your question!
@hhgnehcom7672
@hhgnehcom7672 2 года назад
Its can be achieved by IComponentData,and Whats ISystemState exclusive function?
@TurboMakesGames
@TurboMakesGames 2 года назад
The ISystemStateComponentData essentially just means the data component will persist after the entity is destroyed. You can still reference the entity as its index isn't marked for recycling, but you'll only be able to access System State Components on it.
@hhgnehcom7672
@hhgnehcom7672 2 года назад
If there are two or more shadow, How Can I hook them all in ISystemStateComponent
@TurboMakesGames
@TurboMakesGames 2 года назад
Interesting question - maybe you could have the system state component reference a single entity (like in this video) but that entity has a dynamic buffer that stores references to the various shadow entities. Then in your cleanup step, you could just go through the dynamic buffer and delete all the shadow entities before deleting the single container entity.
@hhgnehcom7672
@hhgnehcom7672 2 года назад
@@TurboMakesGames I just use pointer 😀😀😀😀😀😀
@user-on3zu2fh6j
@user-on3zu2fh6j 2 года назад
Hey please make a tutorial about opencvsharp4 in unity.
@TurboMakesGames
@TurboMakesGames 2 года назад
Good to know you're interested in that, thanks!
@LukeClemens
@LukeClemens 2 года назад
I'm curious, why did you use .Run() instead of .ScheduleParallel() with a parallel writer?
@TurboMakesGames
@TurboMakesGames 2 года назад
Mostly just for simplicity of the tutorial. Though I would be curious as to how many entities would be required for Schedule/ScheduleParallel to be more performant than running on the main thread as there is some slight overhead with scheduling jobs
@LukeClemens
@LukeClemens 2 года назад
@@TurboMakesGames that is an excellent question! On a separate topic, you mentioned that the docs say to only set the data in the state component at creation time, but you think it's not a restriction that's set in stone. Well I tried it, and it's working just fine... So you were right 👍
@eki-eki-eki
@eki-eki-eki 13 дней назад
Renamed to ICleanupComponentData in 1.0
Далее
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Просмотров 1,2 млн
My Flow Field Pathfinding with Unity DOTS/ECS
23:56
Просмотров 10 тыс.
Agents Navigation Crowds - Unity Asset Store Review
10:43
ComfyUI: Advanced Understanding (Part 1)
20:18
Просмотров 70 тыс.