HTML-page body

Document body

Blog

Articles of the blog

  • Whitelisting subdirectories in Git

    After having migrated the development of Grid Framework to Git I wanted to set it up to track only certain sub-directories. I turned out that whitelisting is quite tricky, so here is how I did it for people who might run into the same problem.

    We'll use only one .gitignore …

  • CheckComponent()

    Here is a quick but handy tip. Recently I found myself needing to reference various components in my script without knowing if they exist. I have to get the component and then check if it exists, and if not add it to prevent null exceptions. Here is what you would …

  • Unity and properties/accessors

    As mentioned in the previous post I'd like to relate my experience with using properties in Unity and how to make them work properly. Properties are a C# feature and not available in UnityScript (another reason to ditch UnityScript). To help demonstrate what I mean I will be using a …

  • Hex Grid introduction video

    I made a short video giving you an overview of hex grids, so you can see them right in action. I'll make a video on how to extend Grid Framework with your own methods yourself next,

  • How to loop through a list and remove items

    The other day I had the following problem: I had a list of Transfoms and I wanted to remove the entries that met a certain condition. This is what I had written:

    foreach(Transform trns in transformList){
        if(AlreadyAligned(trns))
            transformList.Remove(trns);
    }
    

    This gave me the following error message …

  • Swap variables in Unity

    I've decided to go with one HexGrid class and provide enough options. To do this I will need to swap around variables so I can use the same formulae for different cases. I could write the swapping part where it is needed, but then I'd be writing the same thing …