Unity ECS Game Object Conversion and SubScene GameObject based data are not ECS compatible. It would be great if it is easy to author the data like before but instead getting ECS data at runtime so that we could work on them efficiently.
Unity ECS Entity remapping Most of the time you don't have any control of the values in Entity component in the chunk. It cause problem when you also bake Entity in some other components as a relationship.
Unity ECS Memory awareness in data-oriented design (Part 1 : Overview) When programming data-oriented you need to take this word more literally. You always think and know where is your data and how they are accessed by machine at every single step.
Unity ECS ECS testing review : system testing VS world testing In Unity ECS, you will have much easier time testing your game programmatically. Everything is data, and data lives in easily accessible from code World, it is as if you can "see" the game running just by looking at all the data in your code editor.
Unity ECS Highly recommended read : dataorienteddesign.com/dodbook Despite it's generic-sounding book name, the author almost always talks in game language. You will feel right at home reading it. I would like to convince you on a per-chapter basis what you will get.
Unity ECS Reminders about data-oriented design I am from time to time "lost" in the data-oriented design practice having used to OOP for so long. This is a quick blog post that maybe helpful to someone out there.
Unity ECS World, system groups, update order, and the player loop If you have started using ECS, you might have heard of the "default world". You may notice that your defined systems are somehow updating magically. In this article, we will learn about that in reversed order.
Unity ECS Tag component Tag component or "zero-sized component" is a special case in Unity ECS where IComponentData doesn't contain any field. The use is to intentionally separate entities to more chunks because a chunk is defined by one set of archetype.
Unity ECS Analyzing Burst generated assemblies In this article, I will challenge Unity's Burst compiler with various job code, and we will along the way learn about what's performant for the game. Get ready for the great assembly adventure, Unity had never been so hardcore about stuff this low level!
Unity ECS Everything about ISharedComponentData This is one of the most misunderstood feature of ECS. Usually results in question like "How could I get SCD data in a job? I can't? Useless!" when you don't know how it was designed. So let's get to know how it works throughly.
Unity ECS Designing an efficient system with version numbers "Change version" are numbers book keeped throughout ECS database already by default. By using them, you could be skipping unnecessary works. Let's see how they works, and how much we could skip.
Unity ECS Minimum main thread block with Async overload There are 3 interesting methods on EntityQuery that has an overload with out JobHandle : public NativeArray CreateArchetypeChunkArray(Allocator allocator); public NativeArray CreateArchetypeChunkArrayAsync(Allocator allocator, out JobHandle jobhandle); public NativeArray ToComponentDataArray(Allocator allocator) where T : struct, IComponentData; public NativeArray ToComponentDataArrayAsync(Allocator allocator, out JobHandle jobhandle)
Unity ECS ECS Singleton Data You have these API to work with singleton data but how do they really works? * system.GetSingleton * system.SetSingleton(T data) * entityQuery.GetSingleton * entityQuery.SetSingleton(T data) It's a singleton Entity In the docs it says "singleton data", but actually you are accessing singleton Entity with
Unity ECS GameObject conversion and SubScene code tour This article is outdated for Entities preview.33, it had several class name changes and various additions.. You can just give your GameObject to GameObjectConversionUtility static class and witness the magic. But it's always nice to know what it does inside so you are sure it really suits your need,
Unity ECS The Chunk data structure Chunk is a unit of data storage of ECS that is central to performance gained. In usual OOP, you simply has address of variables and you simply go to that, but the point of OOP is to obfuscate that away and let you think in objects that you can relate to it more as a human in real world.
Unity ECS Batched operations on EntityManager Jobs aren't always the fastest for all operations. EntityManager operation mostly have to cause structural change on the main thread. Let's see how we could speed this up.
Unity ECS EntityCommandBuffer MinimumChunkSize One chunk can hold multiple commands. The most efficient (performance wise) is to allocate large enough chunk that it does not expand.
Unity ECS Storing arbitrary object type per entity Unity ECS is not all about high performance subset of C# and struct works. Knowing about how it deals with reference types can help you…
Unity ECS Various noise functions They are all generated using Unity.Mathematics library. But the general definition could be applied elsewhere.
Unity ECS Unity.Mathematics vs Mathf. Unity’s Mathf is not 100% replacable with its burst-friendly Unity.Mathematics . Also Unity.Mathematics evolves all the time.