My first thoughts on ECS in Unity

Did you read my last post on ECS in Unity? I did a little introduction to this new approach to programming available with Unity DOTS. It’s “little” different to what we are used to in Unity, but is it a bad thing? Let’s talk!

‼️ Oh, and keep in mind that ECS is still in preview (preview.33 – 0.0.12) at point of writing this post! But it will be fun to revisit it in the future ? ‼️

If you missed whole ECS thing, let me update you! ECS stands for Entity Component System, and it’s part of what is currently known as DOTS, which is Data-Oriented Technology Stack.

There is more to DOTS, but I won’t go deep into it here. Let’s stick to ECS.

Currently, with MonoBehaviours, we are playing in an Object-Oriented environment. With ECS we are going somewhere completely different.

Continue reading “My first thoughts on ECS in Unity”

Introduction to ECS in Unity

Are you ready for ECS in Unity? I’m excited about it and couldn’t wait for the final release! Yes, as of now it’s still in preview (preview.33 – 0.0.12 to be exact) so be aware that content of this post might differ in the future.

But this won’t stop us from getting into it! You and I, we are early adopters. ?

What is ECS?

ECS stands for Entity Component System, and it’s a new way of programming in Unity oriented on performance first. It’s very different from the current approach with MonoBehaviours, as objects are split into new pieces.

Continue reading “Introduction to ECS in Unity”

Using Debugger in Visual Studio with Unity

One of the most important things in programming and only second to using Google is knowledge about debugging your code! Surprisingly not many people know how to do it, so let me show you! This will be an example of how to use Visual Studio for that purpose.

What debugging is?

Debugging is a process of finding errors or bugs in the code. There is a lot of different approaches to doing it. Some involve printing a lot of console logs, and others require you to track which code is executed.

Depending on which way you prefer to work, you might need an IDE that has a debugger. Visual Studio has great integration with Unity[link?], so as long as you are using it, you don’t need to worry about it. If you are using something else, you should double check that.

Continue reading “Using Debugger in Visual Studio with Unity”

Undo and Redo in Unity

Redo and Undo action is everywhere, but how it’s done? In most cases, developers use the Command Design Pattern which we implemented in Unity last time. So how can we extend it with undo and redo action? Let’s find out! ?

Because we did a lot in the last post about the Command Design Pattern, we will use it as our base. If you didn’t see it yet, it’s a great time to do so! I can wait. ?

Ready? So let’s get into that!

There is a lot of places where undo and redo action can come handy. Maybe it’s not that popular in games, but almost every app has it!

Continue reading “Undo and Redo in Unity”

Implementing Command Design Pattern in Unity

Let’s get back to the design patterns for Unity!
Today let’s introduce Command Design Pattern! This design pattern is famous for its encapsulation of requests, which can be useful for many applications and often is used for handling user input, but it’s not the only use case.

Command Design Pattern

The idea behind this design pattern is to move requests to the objects which could be collected and be executed in the queue. You can think about them like Actions or Events but represented as objects.

Continue reading “Implementing Command Design Pattern in Unity”