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: 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

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: Comment Component

Problem Do you ever think “The GameObject setup is so weird, it should be documented” but then don’t do it? Or are you forced to insert components in strange places because Unity just can’t do it any other way? Keyword: Unity’s UI rendering order is influenced by the hierarchy.   Most of the time it … Read more

Unity: Screen Space Gizmos

Unity’s default gizmos are essential for visual debugging but can only be drawn in world space. This restriction can be rather annoying if you try to debug custom UI or viewport-based camera movement. A simple line at a specific pixel coordinate would solve the problem most of the time. There are two solutions to this … Read more

Unity: UI Workflow Improvement

  If you build a game in Unity you will need a few UI screens to guide your player. The number of canvases will increase with the complexity and size of your project.   The canvases and the UI graphics will start to clutter your scene view because canvases are not moveable. This leads to … Read more