February 2012
2 posts
5 tags
Open Source Unity Plugin for Urban Airship →
This is why I was trying to figure out how to modify Xcode projects with AppleScript. The plugin needs some frameworks added, some resources added, a source file patched, etc.
This now works well enough and patches clean enough that I thought people might want to use it. It allows you to use Urban Airship’s Rich Push and Urban Airship’s StoreFront in a Unity iOS project.
Also, if...
7 tags
Modifying an Xcode Project with AppleScript is...
I hope this saves some future Google searcher some time.
TL;DR I wrote a python module that can be used to modify an Xcode project.
https://bitbucket.org/darktable/mod-pbxproj
I spent half a week trying to figure out how to modify an Xcode 4 project using AppleScript. It seems that it worked in Xcode 3, but it’s been broken in Xcode 4 from the beginning.
The wonderful part is that...
January 2012
1 post
Synergy and MacOSX 10.7 (Lion) →
I recently changed my desk layout so my laptop is next to my mac mini’s monitor. It’s awkward trying to cram two keyboards onto the desk, so I looked into some software I’d heard about that allows multiple machines to share one keyboard and mouse.
It’s called Synergy, and I’d heard other game developers sing its praises. The problem was that running the server or...
December 2011
3 posts
1 tag
Unity Editor Lesser Known Features →
Good tips from the guy who wrote the super handy PlayModePersist.
4 tags
Chat in Unity 3D using PubNub →
I’ve been working on a port of the C# PubNub library that can be used from in Unity3d. I put this together as a test for the library.
4 tags
Updated MiniJSON Script →
MiniJSON.cs
Ages ago I found a script for encoding and decoding JSON and popped it up on the Unity forums. Wasn’t great, but it did the job. Yesterday I took a look at it and spotted a bunch of ways it could be cleaned up and optimized.
Even though I still recommend using JsonFX, MiniJSON can still be useful for situations where you just want something really simple (Array, Dictionary,...
November 2011
5 posts
5 tags
Quick demo of JsonFx usage in Unity. →
A couple of people have asked how to use the JsonFx library that I put up on bitbucket. The version I’m using is 1.4 from JsonFx.net, and it is poorly documented.
The two key methods are:
JsonReader.Deserialize<T>(string json);
and
JsonWriter.Serialize(object src);
With Deserialize you need to specify the type (T) you want to unpack to. This can be almost any C# class that...
4 tags
MonoDevelop Code Templates for Unity 3D →
templates
Big day, right? I’m having a little staycation and finally had the time to commit some repositories and write some posts. Tomorrow it’ll be back to playing games (gotta finish Arkham City).
It always annoyed me that MonoDevelop didn’t offer code completion for OnGUI, OnEnable, OnCollision, etc. events. Then I discovered that MonoDevelop had support for code...
5 tags
Unity 3D Mercurial (hg) Automation Script →
Unity Pro has a function that enables external version control. It’s great because you don’t have to pay $500 for a Unity Asset Server license, but it’s kind of a mess because it adds a ton of .meta files, and if you don’t commit the .meta file with the regular file you’ve broken version control.
Unity Pro also has some powerful asset post processor functions that...
3 tags
Script for Auto-saving Assets in Unity 3D. →
AutoSaveAssets.cs
Ummm…I think this works. It waits interval seconds and then saves any modified assets.
This may not seem like a big deal to you, but frequently prefabs and materials in a Unity 3D project aren’t saved until you either quit Unity or select “Save Project” from the File menu. This script sorta fixes that. This can be important if you’re using...
4 tags
Here's my modified version of DebugConsole.cs (for... →
DebugConsole.cs
DebugConsole.cs has been really useful to me. Especially when I’ve been trying to debug iPhone or standalone builds of Unity projects.
When I first added the DebugConsole to my project I didn’t understand a lot of the magic it contained. I’m pretty sure it was my first introduction to C# delegates. Since then I’ve leveled up a few times and add a ton...
June 2011
3 posts
5 tags
You got tipfy in my h5bp! You got h5bp in my... →
I just forked tipfy on bitbucket and committed a bunch of changes that I make every time I start a new project. This includes a base jinja template that is derived from h5bp.com’s settings, and a crapload of mimetypes added to app.yaml, taken from h5bp’s server-config repository.
The hello_world.html has been updated to inherit from h5bp.html, to give an example of how to use...
Today, We Are Brothers. →
And Good Riddance You Fuckers →
Google is ending support for older browsers. I’m really glad they’ve taken this step, because it will encourage others to do the same.
My philosophy for a while has been if you’re too dim to update your browser you should just go back to the MSN homepage and shut up.
And if you’re in a corporate environment where you aren’t allowed to install or update your...
May 2011
7 posts
I Love Distributed Version Control
In the past I’d alway been afraid to contribute to open source projects because creating diff patches, and asking some stranger to incorporate them into their project was daunting.
Over the past month I’ve contributed tiny patches (a couple of lines) to three different open source projects, all of them as pull requests via github, and all of them accepted by the owners in under 24...
2 tags
Top 6 Misconceptions About Unity Dev →
6 tags
A Family of GAE Loggers
I’ve created a family of custom logging handlers for use with Google App Engine. These can be used when you need to watch the logging messages generated by your app in real time, after it’s been deployed (watching logs locally is a piece of cake).
You can always go to the dashboard and keep refreshing it, or download logs periodically, but with these utilities you can have log...
5 tags
Gendarme can improve your Unity code.
Download gendarme (may need the latest mono too): http://www.mono-project.com/Gendarme
Put it somewhere on your path.
Open a command prompt and go to your Unity project’s directory.
type in: mono gendarme.exe --html mistakes.html Library/ScriptAssemblies/*.dll
Open the mistakes.html file that was just created and see some of the bad things you are doing in your scripts.
There will...
4 tags
Static Site Hosted on App Engine? Easy.
Here’s a little app.yaml gist that allows you to host a static html site on Google App Engine. This could be useful if you’re too cheap to buy your own domain, or if you are worried about having to serve an insane amount of traffic.
https://gist.github.com/873098
It copies a lot of the mime types and suggested expiration times from the .htaccess file included with the HTML5...
6 tags
Synchronize Swatches
An issue came up on the App Engine Google Group a while ago where people were seeing clocks out of sync across instances. It now appears that this was probably coming from module caching, and not bad instances. In any case I came up with a hacky way to synchronize clocks across App Engine instances.
https://gist.github.com/836228
I called the file “swatch.py” and the method...
7 tags
JsonFX JSON Serialization for the Unity Engine.
I made a couple of minor tweaks to the JsonFx .Net JSON serializer to make it work well with Unity projects. There were a couple of minor features that allowed you to include XML inside of your JSON object. Why the hell anyone would want to do that is beyond me. I removed those, which allows JsonFx to work without depending on the System.XML assembly. This reduces it’s uncompressed size...
February 2011
1 post
4 tags
Great tip for building assemblies for Unity3d →
Yesterday I was looking for instructions on building mono assemblies for Unity, and today AngryAnt posts this howto.