Am I Quitting?!

I hope you like my content so far. I have a blast making it, and it’s a great way to document some cool programming concepts. ?

That’s why I wanted to get back to writing blog and collecting some useful resources in my public repository, which you can also check! ?

I’m planning to add a few more things to my blog, but I will require some time to sort that out. Besides, this blog is not the only thing that I’m working on currently, so I won’t be able to stretch myself to do all of it at the same time. ?

With that said, I’m going to take a 2-week break from posting new content here and on my social media profiles. I think it will be enough time to do all of the things here and prepare some fresh content for you! ❤️

In the meantime, you have over 30 posts and 20 repositories to go through!

See you all back on June 24th! ?

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”

Conditional Compilation in Unity

We are spoiled by Unity with that whole “write once, run everywhere” thing. But what if we want to run different code on different platforms? Conditional compilation will come very handy here, or like Unity like to put it Platform Depended Compilation. ?

Wait, what’s that?

Great question! Conditional compilation is basically a way to tell the compiler to run code only if compiling condition is met.

Wait a moment. This sounds a lot of like a regular if-statement! What’s the catch?

Continue reading “Conditional Compilation in Unity”

Extension Methods in Unity

Today we are going to learn something entirely new! Extension Methods!
Sometimes as you are developing a game, you have this idea in your mind that you wish you could add some more functionality to Unity Components.
With extension methods, you can do that! ?

But how do they work?

Extension methods are mostly used when you have existing classes, but you can’t edit them, just like in Unity. With them, we can add more functions that will make our lives easier.

Continue reading “Extension Methods in Unity”