Dropdown list in Unity Editor

A handy little piece of code that lets you select from a pre-populated drop down list in the inspector. Make sure both of your variables are set to public otherwise it will error (C#).

March 5th, 2013 | Comments (2)

Three.js Car Experiment

Messing around with three.js today, which makes use of WebGL to display 3D content in the canvas element.

Drive a Lamborghini here


January 5th, 2013 | Comments (0)

UIToolkit Camera Fix

prime31’s UIToolkit is still my choice for all things UI in Unity, primarily because its free, and also because I haven’t found a task yet that it can’t do straight out of the box or with some minor code tweaks.

Annoyingly after upgrading to Unity 4, it didn’t seem to work properly on mobile. It looked like the camera wasn’t setting the correct positions for the Touch Areas on initialisation, and graphics were all over the place. Luckily a helpful guy over on the Unity forums posted a fix.

in UI.cs, change _uiCamera to be a static variable, and create a new function called setSize:

And then call UI.setSize() once the scene has loaded.

December 3rd, 2012 | Comments (0)

UIToolkit Buttons and Unity WebPlayer

Ran into a problem the other day when publishing a Unity game to Webplayer – all of my UIButtons were broken and not detecting clicks. After a bit of a search, I came across a solution on Github posted by a chap called hyakugei.

Basically it involves using a wrapper around Touch instances to fake them when a touch is detected, as for some reason they don’t get picked on WebPlayer builds.

You can either download his branched UIToolkit, or, as I did run through the list of changes and add them manually. I picked this route because my UIToolkit is already heavily customised. Works like a charm.

October 23rd, 2012 | Comments (0)



LAN Multiplayer Unity game!

Try it here

June 4th, 2012 | Comments (0)

Snowboarding in Flare3D

Having recently been on an awesome snowboarding holiday, and with the Winter X Games in full flow, I decided to play around making a snowboarding game.

First test can be found below, utilising the awesome Flare3D engine for Flash.

Snowboarder 3D

Try it here! (might take a minute to load)

January 26th, 2012 | Comments (0)