Archive for January, 2011

Using Multiple AssetPostprocessors

Thursday, January 13th, 2011

In working on my asset pipeline for my current Unity project, I stumbled across something handy today I hadn’t needed to use before. As such, I figured a short post might help me remember and spread a useful tip. Specifically, the AssetPostprocessor class contains a function GetPostprocessOrder(). I didn’t find the documentation to be immediately obvious, so here’s a quick example.

A couple of weeks ago, I posted up an example video for an automated Blend Shape extraction tool I made for Unity and Maya. Moving this tool back into Touch KO 2.0, I needed it to work in conjunction with another big AssetPostprocessor script that sets up my boxer prefabs. Basically, I needed to make sure that my blend shapes were all set up on the character before I start building the prefab, so that I can link them up as needed.

My first thought was to make my prefab setup script inherit from the blend shape importer, call the base method, and then call all of my setup stuff. This approach would work, provided that my base method appropriately contained controls to avoid reduplication of information. Then I stumbled across this function. All I had to do was add it to my AssetPostprocessor class that sets up my boxer prefab.

/*
 * Ensure this script executes after blend shapes have been set up
 * */
public override int GetPostprocessOrder ()
{
	return 100;
}

Using SVN and UAS to Synchronize Library Code in Unity

Saturday, January 8th, 2011

So, you’ve bought Unity Pro and the Unity Asset server. If you’re like me, in spite of its disadvantages, you really like the UAS. It’s integrated into the editor and does a much cleaner job of versioning on serialized assets than does external version control, because it operates on the project’s Library folder rather than requiring you to generate and synchronize all of the sidecar data. However, there are some key things it cannot do.

I don’t have very complicated needs like branching and so on, but I do have a library of common code that I share across projects. This library contains a bunch of useful stuff that doesn’t rely on any game systems: things like helper classes, math classes, serialization for built-in types, and so on. The trouble is, I’m often working simultaneously on a bunch of projects that share my library (or worse still parts of my library), and so it can be a pain in the neck to push the changes out across all my projects. As such, I took the time to set up a system using Subversion working on top of my UAS projects in order to synchronize my library code.


(more…)

Unity Asset Store Updates

Thursday, January 6th, 2011

Some recent Unity Asset Store updates of mine have gone live tonight! There’s a new version of the Biped Editor (1.03) with some new library code and minor bug fixes, as well as a package of Custom Handles that I showed at Unite. Custom Handles includes handles for shapes, configurable joints, discs, arcs, helices, and more, along with some examples like a helical particle emitter and a helical mesh ribbon. Have fun!

GDC and a New Year’s Resolution

Saturday, January 1st, 2011

Well, 2010 is now done, and I think I’ve selected some important goals for myself this year: learn to say “no” to interesting projects, and finish my own stuff! I have a TKO update forging ahead behind the scenes, and in the process I’ve built another tool I wanted to show, as it will be part of my Complete Maya-Unity tools release coming soon.

Alongside the TKO update, I’m promising a 0.1 release for the Maya-Unity tools by GDC! The board has finally approved a submission from me, so I’ll be doing a session on Automated Pipelines for Generating Run-Time Rigs. I want to have a version of the tools ready to go by then so people will be able to download them and have a look if interested. My GDC session will basically be a higher-level, expanded, and much more detailed look at some of the stuff I showed during my talk on advanced editor scripting at Unite 2010, for anyone who was there.

Unite is actually a good segue into the video I have to share today, too. At the conference, I had showed some examples I had of using editor scripts to generate sparse blend shape data offline. The point was to demonstrate the usefulness of editor scripts in reducing run-time computation, but I unfortunately didn’t have a good pipeline for it yet. So I put together a decent first pass on native blend shape support this week. It, too, will be part of my 0.1 release for my Maya-Unity workflow, so hopefully a couple of you out there will be looking forward to it. Have a great 2011!