Using tags as a dropdown property in Unity’s inspector using PropertyDrawers

If you have ever tried to use tags as a variable input property in a Unity inspector script, you have probably used a regular string property or an array of them.
Then you would be manually typing the tags you want to use in your script, having to double check if they are written correctly and part of the tags that are currently available in your project.
This works just fine but can lead to user input errors and is just plain annoying to use.

Luckily there is a simple solution for this problem!
Using a custom attribute we can visualize our string as a drop-down popup that lists all the available tags, allowing us to select the tag we want and having the selected value automatically assigned to our string.

TagSelectorAttribute Example
Continue reading

Dissolving the world

Obstruction handling and dissolve shader techniques in Trifox

Glowing world space dissolve effect.

A while back I’ve written a 2 part article/tutorial on how I created the dissolve effect for the game Trifox, currently being developed by Glowfish Interactive.

One of the first challenges we faced during development was keeping the main character in view using the top down camera while at the same time maintaining the sense of being present in a full 3D environment. In other words, how do we deal with objects obstructing our view of the main character? Do we avoid them? Do we hide them? And if so, how do we hide them in a visually pleasing and smooth manner that fits with the style of the game? How can we maintain a sense of space without hindering gameplay? Continue reading

Hiding or Disabling inspector properties using PropertyDrawers within Unity

Blog_Unity5PropertyDrawers01_2015_11_29_Example05When working with unity and larger scripts that provide a lot of adjustable parameters, the inspector can quickly turn into a very unmanageable wall of text and entry fields.

So lets take a look at what can be done to make inspector navigation a much more enjoyable experience without having to write a custom inspector layout for your script.

In this post I quickly go over the use of HeaderAttributes to help you keep the inspector clean and easy to work with. And finally I explain how you can hide or disable inspector properties based on a bool field within your script. Continue reading

Using QT Designer and PySide to create Maya 2014 Editor Windows

As it turns out trying to implement a custom GUI made with an external editor and using Python to interact with them can be quite a pain in Maya 2014.
Not because it is a difficult process, but because there is very little information on how to do it to be found. And if you do find information, there are either missing steps in the process or require a certain amount of prior knowledge. So here is a short overview on how to get a custom UI made with QT designer working in Maya 2014. Continue reading