Finding out if a Texture is Readable when Editor Scripting for Unity3D

There is a really simple way to find out if a Texture2D is readable when you’re doing an editor script. It took me longer than I expected so I thought I’d blog about it so others might find it easier in the future…

Texture2D myTexture2D;
string texturePath = AssetDatabase.GetAssetPath(myTexture2D);
TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(texturePath);
if(textureImporter.isReadable)
{
	//have some fun!
}

It’s pretty simple and something you really need to know if you want to mess with the textures inside the Unity3D editor.

BuildR – released onto the Unity3D Asset Store

BuildR - on the Unity3D Asset StoreToday I released my second product on the Unity3D Asset Store. It’s very much based off the work I have been doing on Redacted though it’s pursuing a different direction (realistic external rather than abstract/internal building generation). With BuildR you can create external building models within the Unity3D IDE without a 3D modeling program. I’ve worked hard to create a simple system that gives the user as much control over the building as I could imagine. At the moment you can export your model into the OBJ format although I’m working on an FBX export option too (a little trickier as I’m having to reverse engineer the file format – fun!).
I’m releasing it as a beta and at a reduced price to begin with. I’m not sure how many bugs people will find as there is only so much testing a few people can do. I also feel like there might be additions to the workflow as some people will want it to use BuildR in ways I have not yet imagined. At the moment it’s not really set up to run at runtime, there’s little support to link into other code or is it ready for full procedural generation. I’m confident this will all be included in the future though. As the codebase matures and more features make it to the release, I will increase the price.
I’d like to give a big thanks Sergio, Aidan, Jerome who very kindly had a go on some of the early alpha/beta releases and weeded out some bugs, smoothed some edges and made it a better product.

Get it here on the Unity3D Asset Store
Check out the main website for more details

Visual Effects on the Avengers Movie

I enjoyed the Avengers movie. It knew what what kind of film it wanted to be and managed to hold itself together with so many protagonist characters running about screen. I ate a lot of popcorn, laughed and said wow at the appropriate moments.
Then I watched this Youtube clip and realised how much work went into making it. Almost nothing was real! I’m not hear to discuss if that’s a bad thing in movies or not. But the technical achievement had my inner geek drooling.
I especially liked the interior mapping thing as I’ve seen and used similar things in Unity already. Check out Aubergine’s shader pack for similar effects right within Unity in real time. It’s a simple premise for a shader really but it works so well!