Blog

Baking Unity NavMesh with Box Colliders

January 10, 2014 by Devin Reimer

Up until recently in Dyscourse we had been using a pathfinding solution called “A* Pathfinding Project”. While it was a pretty impressive tool we weren’t happy with performance and some of it’s complexity. So I decided to give Unity’s built-in NavMesh a try.

Unity’s NavMesh worked pretty good, but it had one big issue, it didn’t support baking Box Colliders into a navigation mesh. It only supported MeshRenderers and Terrain. In Dyscourse we have a 3D world but everything is flat 2D planes, so this simply wouldn’t work.

Not deterred, I ended up figuring out a work around and created an editor script to do all the heavy lifting. This script automatically bakes Box Colliders into the navigation mesh with the press of a button.

Download NavigationHelper.cs (right-click save as).

To Use:

Simply put this script into an ‘Editor’ folder and add a new Tag into your project called: “TempNavMeshItemDestroyable”.
Run by going to Windows->Navigation Helper and then click ‘Build NavMesh!’. Everything happens automatically.

As an additional option in the script you can edit the COLLIDER_LAYER variable and set it to a layer you want to filter Box Colliders to.

2D Toolkit UI

June 5, 2013 by Devin Reimer

Over the past few projects I’ve been working on a UI framework for use with 2D Toolkit. I love 2D Toolkit, but it biggest issue was the lack of a UI solution. I tried NGUI and while it is powerful, I found it clunky and very slow (big problem on mobile).

So I set off to build my own UI framework that would work with 2D Toolkit. The criteria was it needed to be fast, easily extensible and event-driven. After numerous iterations I had something really solid that dramatically improved our workflow. I then realized that other people would probably find this useful.

I shot an email over to the creator of 2D Toolkit and after some discussion we came to an agreement.

With that, this UI framework is now included in 2D Toolkit!

This means if you already own 2D Toolkit you get it for free. And if you do not already own 2D Toolkit, it will come bundled with it.

Win-Win-Win!

Webplayer Demo: http://www.unikronsoftware.com/2dtoolkit/webplayer/uidemo/

2D Toolkit Unity Asset Store: http://u3d.as/1Wi

 

Unite 2012 Amsterdam Presentation

October 29, 2012 by Devin Reimer

This past August I attended my third Unite (Unity Conference) in Amsterdam. This year I got the opportunity to give a presentation with Alex Schwartz. Our presentation was titled, “Continuously Bootstrapping an Indie Studio by Remaining Agile with Unity”.

We got a lot of positive feedback and people really like it. Unity did a wonderful job recorded the session and have put it up on their site.

Watch presentation : http://unity3d.com/unite/#6952894

I would like to thank Unity for putting on the event and all the people that attended. Unite was once again a fantastic experience.

Tags & Layers Constants Generator in Unity

August 3, 2012 by Devin Reimer

I hate using manually typed strings for comparing, it’s error prone, lacks auto-complete and is sometimes difficult to change.

This is why, in all my Unity projects I have two classes, Tags.cs and Layers.cs. These contain constants for each tag and layer entry. This way I get auto-complete, it’s not possible to make a typo and if I need to make change, it’s all in one place.

The downside is that every time I make a change to Tags or Layers, I need to also update the corresponding class. So I finally wrote an editor script that does this for you.

After you make a change to tags or layers, simply go ‘Edit->Rebuild Tags and Layers Classes’. It then auto generates updated versions of the classes and putting them in the Scripts/AutoGenerated folder. To use, simply type the constants, ex: Tags.RESPAWN or Layers.IGNORE_RAYCAST.

Download TagsLayersBuilder.cs (right-click save as).

Remember to put it in a folder called ‘Editor’ in your project.

PlayModePersist Version 2.0 – Unity Asset Store

May 22, 2012 by Devin Reimer

PlayModePersist Version 2.0 is now available for download in the Unity Asset Store – http://u3d.as/content/almost-logical-software/play-mode-persist/1tS.

PlayModePersist is a Unity Editor Extension that allows you to persist changes you’ve made in the Unity Editor while in Play mode.

Thanks to some great feedback from users, PlayModePersist has been reworked to be both easier and faster to use. The biggest change is now PlayModePersist is window-based (no more needing to constantly open a dropdown in the Transform). This allows you to persist GameObject components faster than ever. This change has also allowed us to support Multi-Object Editing (new to Unity 3.5). You can now select multiple GameObject and then select groups of components to persist. Want to persist 30 Transforms on 30 different GameObject, you can now do that with one-click.

To see PlayModePersist in action check out the new video tutorial: http://youtu.be/NCkD7XgN4so

To learn more about why PlayModePersist is so helpful you can read my original blog post:  http://blog.almostlogical.com/2011/01/11/playmodepersist-unity-asset-store/

If you already own PlayModePersist this update is free, simply download the update. If you haven’t yet picked up a copy, what are you waiting for? Get it today: http://u3d.as/content/almost-logical-software/play-mode-persist/1tS

Office Zombie Simulator in Flash via Unity

December 23, 2011 by Devin Reimer

With the Unity 3.5 developer preview being made available to the public yesterday, I set out to try the new Unity to Flash exporter. I’ve been looking forward to this feature since it was announced almost a year ago. The first project I decided to work on was Office Zombie Simulator, a small game Calin and I build back in February.

The major stumbling block with porting this project to Flash was that it uses iTween. As a lot of people have discovered iTween does not work with the Unity Flash exporter. Yesterday, I spent the day hacking iTween and got it to work with the Flash exporter. Get the modified version of iTween here.

With iTween working, I spent part of the day fixing up a few issues and now Office Zombie Simulator works in Flash. While it’s a little rough around the edges it is simply amazing that I’ve brought something of this complexity from Unity into Flash in just a couple of days.

Without further ado, here is the Flash version of Office Zombie Simulator.

I want to do a huge shout-out to the Unity team, what they have accomplished is incredible. I look forward to what the future brings.