SourceTree Windows Crash Bugfix

So I use SourceTree and I love it. However it was crashing on me every time I tried to open a repository!

Additionally, my visual studio just stopped using line numbers as well, and was giving me an error message. So I looked it up.

Ran into this link:

So I went into my AppData/Local/Temp folder and saw there were more than 60 thousand files there! So I just deleted them all. That fixed it 😀

Unity3D Hierarchy Highlight Helper Script

This little snippet allows you to see which objects you are hovering over in the Unity3D hierarchy pane. It also shows which objects are being dragged.

Here’s the script. You will need to place this script into your Assets directory, inside the ‘Editor’ folder. If the ‘Editor’ folder does not exist, you need to create it.

How it works:

When the Unity3D editor loads, it calls the static constructor of this script. Then, the HighlighHelper hooks on to the scene view’s GUI callbacks, editor update callbacks, as well as the editor’s Hierarchy Pane’s item callbacks.

Whenever the Unity3D editor updates, the script checks whether the user is hovering over the hierarchy pane or not. If so, then it allows the window to get MouseMove callbacks. It’s hacky, but it works! Then, during the MouseMove events, the script checks if the mouse is inside the rectangle of the name label for any gameobject in the hierarchy, and if so, it notes down which object’s name is hovered over.

The scene view gui method then looks up if any gameobjects match that ‘instance ID’, and draws some circles around them. It does the same for dragged objects. I hope it helps! If you have any questions, please write it in the comments.

Update: I have just created a repository for the script here: so it will be easier to track any changes or allow any pull requests.

Importing XML Spritesheet into Unity3D ( Starling Framework TextureAtlas )

Edit: Update here!

Starling Framework’s spritesheets are described by the TextureAtlas XML files.

Recently I have donated to the KenneyLand crowdfund and Kenney ( has sent me an asset pack containing a lot of spritesheets and other great assets. The spritesheets also came with XML files next to them. I currently use Unity3D as my main development tool and wanted to use these spritesheets for some of my game ideas.

I will now explain how I wrote a script to let me easily slice 2D sprites.

We will use the UI pack: Space extension by Kenney as an example. The spritesheet looks like this:

Continue reading

Unity 2D Game Development

Cover of the Unity 2D Game Development book
Cover of the Unity 2D Game Development book

The Unity 2D Game Development book, written by Dave Calabrese and technically reviewed by me has recently been published!

The book teaches the readers how to:

  • Build a 2D game using the native 2D development support in Unity 4.3
  • Create a platformer with jumping, falling, enemies, and a final boss
  • Full of exciting challenges which will help you polish your game development skills

You may view it in Packt!

Fixed-width labels for fields in Unity3D Editor GUI


Unity3D’s default GUI system has dynamic label width. This ensures that the input boxes start at the same position. It can results in problems in specific cases, though. The label will be cropped if:

  • It is too long
  • The window size is too small
  • There is too much indentation before it
You can see some of the advantages and disadvantages of dynamic-width labels in the .GIF after the jump:

For the following part of the article, I am assuming you have some knowledge of C#, and Unity3D (Editor) GUI calls.

If you need any help, feel free to post a comment below. I will try to answer you or direct you to the right path when I can.

Continue reading

Ludum Dare October Challenge 2012

This Ludum Dare October October challenge is quite simple. It has only three steps:

  1. Finish a game
  2. Take it to market
  3. Earn $1

There are no restrictions, you can finish any game you were working on, or even make one from scratch! There is a very useful guide (posted in 2010, but still relevant) “to get a new game for sale somewhere”.