Archive for May, 2012

Using Unity as a Level Editor

May 19th, 2012 No comments

Having another trimester of QANTM behind me, I’m now beginning work on a 24-week group project. There’s a fair amount of work to be done, and after some brainstorming we’ve decided to use Ogre. As 2/3 of the dev team aren’t programmers, I’m tasking myself with giving them easy access to adding to the game. This is where Unity comes in. Unity is flexible and it’s very easy to use to come up with something within its editor. The editor itself is also very flexible and allows for a lot of access to the tools and the C# Mono framework. With it I’ve developed a plugin that exports all compatible entities within a level to a custom format that will eventually be readable from within Ogre.

The Unity editor – Intended to be replicated within Ogre

At the moment it’s a three-stage project (the plugin, not the entire 24-week plan).

  1. Write the exporter plugin in C# in Unity
    • Terrain exporting
    • Texture conversion and exporting
    • XML Generator
  2. Write the importer with TinyXML in Ogre
    • Write the supported entities
    • Create the importer
    • Link the two together in a test project
  3. Provide documentation to the dev team
    • Instructions on how to use the actual plugin
    • Guidelines on plugin requirements within the Unity editor environment

Current file hierachy created by the exporter. Very simple at the moment.

Right now the first stage is more or less complete, so I’m planning on writing the importer soon where I’ll be able to present some interesting progress. The more interesting information of course will come later as actual project work begins.

The automatically generated XML-compliant level file. Ignore the fact point lights have a direction.

Categories: Me, Programming Tags: , , , ,