Unity: Events vs Interfaces

“Events are evil!” is a common opinion among Unity developers. What are the reasons behind this statement and are interfaces an alternative to events? Example implementation at the bottom.     Problems A common source for event bugs are timing issues. For an event to work correctly you have to subscribe before it’s triggered and … Read more

Unity: Null Check Not Working?

Ever checked an object for null and it didn’t work? Computers do precisely what you tell them to do -> it must be a programming error that bypasses the null check.   This is one of the moments where I doubt my sanity as a programmer.   What Happened? The C# target object isn’t null … Read more

Unity: Preserve Articulation Body State

One constraint of articulation bodies is that they lose their physics state if their hierarchy changes. This behaviour manifests as snapping back to their initial configuration/position. You can find a short overview of the constraints and advantages of articulation bodies here.   Problem Changing the active state of the root articulation body is also a … Read more

Unity: Articulation Body Overview

The system was integrated for industry applications like realistic physic simulations for robotics or the training of neural networks. But it can also be used in games where a high precision physics simulation is needed. For example physics-based puzzles.   Some parts of the feature are still buggy or not completely implemented yet. Especially the … Read more

Unity: Articulation Body Documentation

I’m currently playing around with articulation bodies which were introduced in 2020.1. Some parts of the feature are still buggy or not completely implemented yet. Especially the spherical joint seems to exhibit a lot of bugs that crash Unity’s physics system and should be avoided at the moment.   Because the feature is so new … Read more

Private Variables and LEDs

I played around with my Arduino starter kit and read a few pages in Making Embedded Systems (more on it here). Now I am ready to blink the built-in LED of my board. My first approach looked like this: #define LED LED_BUILTIN void setup() { SetupLED(); } void loop() { EnableLED(); delay(1000); DisableLED(); delay(1000); } … Read more

Unity: Sync Objects With Music

So you want to build a rhythm game. A game that has elements moving in sync with the beat of your music. I participated in the rhythm game ‘A Jesters Tale‘ at the Nementic game jam. And it turned out it’s not as easy to sync objects with music as it seems at first glance. … Read more

Unity: Frame by Frame Animation with Dynamic Eyes

Can you have dynamic eyes that react to the environment but at the same time use frame-by-frame animation for the body? Yes, you can do that in Unity and it’s not difficult at all. Most of the work is setting up the hierarchy of GameObjects in Unity correctly and creating the animations. The frame-by-frame animation … Read more