Code

Code brings games to life. This section explores the basics of game programming as well as some topics for the more advanced programmers.

How to symbolicate an Android native stack in Unity

If your app crashes on a device then you will get a crash log and it may be a native backtrace.
Read article ..

What is a NullReferenceException?

In this article, we explore what a compilation error, a stack trace, and a NullReferenceException are and how to solve them. This is for the very beginning of your programming adventure. We've all been there once, so let me help you :-)
Read article ..

Composition vs Inheritance in Unity

Although inheritance is a powerful tool, composition is quite often the better approach. This article explores what happens if composition is used whenever possible.
Read article ..

Let the AI write the code

AIs have been all the rage for a while now. And rightfully so. Language AIs like ChatGPT are powerful tools and they are here to stay.
Read article ..

Unity [Attributes] to the rescue

Attributes are a true productivity booster. Here is a list of the handiest attributes in Unity. You ignore them at your peril.
Read article ..

Start with first scene script

Sometimes when working on a scene in Unity you do not necessarily want the play mode to start with that scene (which is the default behavior).
Read article ..

Unity Events with dynamic values

Something that's easily missing is the top "Dynamic" section in the function selection.
Read article ..

Application.dataPath points to /Assets

If you need a quick handle on the Assets folder in the Editor then you can simply use:
Read article ..

Surprises with Scriptable Objects and private fields

It is general knowledge that the Unity Inspector shows every that is serialized unless it is hidden with the [System.NonSerialized] attribute. If we want a private field to be serialized and visible we add the [SerializeField] attribute. So far so good...
Read article ..

Byte code striptease

We all know about Managed Code stripping and that we have to manually mark code to not be stripped if that code is not referenced (called by reflections for example).
Read article ..

Fixing bounding boxes for Unity cloth

If the bounds center of a skinned mesh renderer is outside the camera frustum it will not be rendered unless you have the Culling Mode of the Animator component set to Always Animate. Now the tricky thing is that for cloth the bounding box is sometimes...
Read article ..