Unity: Load Assets in Editor

Sometimes you need to load assets in the editor without the comfort of a direct reference. Assets are loaded using the AssetDatabase and it can be done by Instance ID The instance ID is visible at the top of the inspector when the inspector debug mode is active.   Beware, the instance ID  survives enter/exit … Read more

Programming Glossary

Ever wondered how code can be dirty, what refactoring means and why there are no silver bullets? I compiled a glossary with short explanations to help you get an overview of some of the confusing phrases used by programmers. If something is missing that you would like to see explained in the glossary leave a … Read more

Unity: Don’t Cache in OnTrigger

Let’s make it short: Don’t use the OnTrigger callbacks in Unity to maintain caches.   When I say caches, I mean any kind of collection that tracks the objects inside the collider. The callbacks are unreliable, and Unity has no intention of fixing the behavior in the near future.   It’s not guaranteed that you … Read more

Unity: Better Inspector

Improving the inspector in Unity can have significant benefits for game development efficiency and workflow.   An organized and easy-to-read inspector layout can provide quick access to game objects, components, and properties, making it simpler to identify and modify different elements of the game without having to navigate a cluttered and confusing interface.   In … Read more

What’s Antialiasing and Why is it Blurry?

Before we talk about antialiasing, we must discuss the problem it tries to solve. It’s called aliasing and is generated by improper sampling.   Aliasing The term originates in the field of signal processing. In computer graphics, it describes a variety of ugly artefacts and image flaws created by improper sampling. Staircase-like artefacts that appear … Read more

Book Recommendation: Algorithm Design

I really like reading in general but especially reading technical books. In contrast to digital content, a book must pass a technical review before publication. This ensures to a certain degree that the content is good or at least not entirely wrong.   When searching for information online you must always ensure that you are … Read more

Unity: Animator State Lost?

Sometimes there is an animated gameObject which mustn’t stop animating or its state breaks. If it should continue off-screen you can set the Culling Mode of the animator to Always Animate.   But sometimes that’s not enough. When you disable an animator in the mid of an animation, it’s most likely stuck the next time … Read more

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