DEV Community

Rathod Ketan
Rathod Ketan

Posted on

What is ECS in Unity

Today, I’ll be tackling some of the common questions Unity developers often ask: 'What is ECS in Unity?', 'Is it worth using ECS in your next project?', 'Can I migrate my existing project to Unity ECS?', and 'Where should I begin learning Unity ECS?'. Stick with me as I provide answers to all these questions in this post.

When I first started learning Unity DOTS, I came across a number of frequently asked questions and discussions on platforms like Reddit, Unity forums, and Discord channels. Now, I’d like to share my experiences and provide answers to these questions

what is ecs in unity by learnunityecs101.blogspot.com
image by unity.com

Check Next Post :
Setting Up Unity DOTS Creating and Configuring Your First Entity

What is ECS in Unity ?

The technical definition of ECS can be found in Unity's official documentation. If you’re struggling to understand it, don’t worry—I’ll break it down for you in a clear manner, using Unity's official comic-style illustrations.

ECS stands for Entity Component System, a key element of Unity’s new data-oriented technology suite known as DOTS. To explore the other technologies that are part of DOTS, feel free to check out the 'What is DOTS' section.

Follow original post for get full form of ECS and why it divided in to three part.

Is ECS worth using in your next project?

Let me address that. Ultimately, the decision is yours, but I’d suggest using DOTS if your game features a large number of game objects and intricate logic. Unity claims that DOTS is highly capable of managing such complexity while keeping a stable frame rate. For more details on the performance benefits, you can explore Unity's blog post on the subject.

Can I convert my old project to Unity ECS?

Yes, it’s possible to convert your project to DOTS; however, let me clarify a key point. If you’re working on demo projects or prototypes, converting them is perfectly fine. On the other hand, transitioning a live, published project to DOTS isn’t generally advised. This is because converting to ECS effectively involves rebuilding your project from the ground up, and you won’t be able to reuse the programming components from your original project.

From a technical standpoint, DOTS doesn’t adhere to the traditional principles of Object-Oriented Programming (OOP) for managing logic or code. Instead, you’ll need to separate your logic into Systems, your data into Components, and your game objects into Entities.

If you’re considering a conversion, the Unity ECS 101 blog is a great resource to get started. I’m currently in the process of converting a project to ECS myself.

Where should I start learning Unity ECS?

The big question is: When should you begin learning ECS? Don’t worry—if I can learn it, so can you. But why is my approach beneficial for you? Because I’ve already reached an intermediate level in ECS, and I’m here to share the best resources to help you kickstart your learning journey.

First, it’s crucial to grasp how DOTS differs from Object-Oriented Programming (OOP). Since DOTS doesn’t follow OOP principles like encapsulation and abstraction, start by familiarising yourself with Unity DOTS best practices through Unity’s official tutorials. Following that, I recommend reading Unity’s official documentation on the ECS package.

Next, you should explore Unity’s official GitHub page on DOTS, where you’ll find video tutorials and example projects showcasing best practices.

After completing these initial steps, you might feel a bit overwhelmed and start doubting whether DOTS is right for you. That’s when you should turn to my resources, which offer a smooth and easy transition from non-ECS projects to ECS-based projects.

From there, follow my tutorials on converting your old Unity project into an ECS-based project. Why use my resources? Because after you understand DOTS best practices, you’ll need to master the fundamentals, such as adding and removing components, instantiating entities, and more advanced topics like parenting entities, using buffers to manage entity destruction, and working with arrays in ECS.

Finally, start asking your own questions and use the official documentation to find answers. It’s also a good idea to watch YouTube tutorials, browse relevant Reddit pages, and join Unity’s Discord community to gain more best practice insights.

That’s all for now. In the next step, I’ll begin the Project Conversion posts, where you’ll learn how to transition non-ECS projects into ECS-based Unity projects. To stay updated, be sure to check back on the Learn Unity 101 blog. If you have any questions, feel free to leave a comment. Have a great day, and I hope you enjoyed this post!

Top comments (1)

Collapse
 
rk042 profile image
Rathod Ketan

Follow me for upcoming posts list. there I am going to serve how to convert your non-ecs project to ECS project in unity.