Game Torrahod
  • Unity ECS
  • Usable Unity stuff
  • Unity Articles
  • Story
  • Author

Unity ECS

「We went completely nuts, and code the engine again from the ground up.」...or so the Unity CTO said on stage. Are you up for the new challenge?

Game Object Conversion and SubScene
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
54 min read
Entity remapping
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
11 min read
Memory awareness in data-oriented design (Part 1 : Overview)
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
10 min read
ECS testing review : system testing VS world testing
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
22 min read
Highly recommended read : dataorienteddesign.com/dodbook
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
10 min read
Reminders about data-oriented design
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
16 min read
World, system groups, update order, and the player loop
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
13 min read
Tag component
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
12 min read
Analyzing Burst generated assemblies
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!

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
53 min read
Everything about ISharedComponentData
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
18 min read
Designing an efficient system with version numbers
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
16 min read
Minimum main thread block with Async overload
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<ArchetypeChunk> CreateArchetypeChunkArray(Allocator allocator); public NativeArray<ArchetypeChunk> CreateArchetypeChunkArrayAsync(Allocator allocator, out JobHandle jobhandle)

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
4 min read
ECS Singleton Data
Unity ECS

ECS Singleton Data

You have these API to work with singleton data but how do they really works? system.GetSingleton<T>system.SetSingleton<T>(T data)entityQuery.GetSingleton<T>entityQuery.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
7 min read
GameObject conversion and SubScene code tour
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

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
20 min read
The Chunk data structure
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
7 min read
Batched operations on EntityManager
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
16 min read
EntityCommandBuffer MinimumChunkSize
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
2 min read
Storing arbitrary object type per entity
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…

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
5 min read
Various noise functions
Unity ECS

Various noise functions

They are all generated using Unity.Mathematics library. But the general definition could be applied elsewhere.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
6 min read
Unity.Mathematics vs Mathf.
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.

  • 5argon / Sirawat Pitaksarit
    5argon / Sirawat Pitaksarit
3 min read
Game Torrahod © 2021
Latest Posts Facebook Twitter Ghost