- Home /
Using OGMO
Hi, I was just wondering if anybody had got OGMO levels (basically just XML files) to work with Unity. Here is an example of what an exported OGMO level looks like: EXAMPLE. This is not exactly what my level files will look like, but it is very similar(just different names really, oh, and forget the "floors" bit, my levels only use one main XML tab thing). My plan is to use TextAssets to load all of the levels into a script as strings, and then loop through every "tile" tag, instantiating a new cube (or brick if you are following the example) at the x and y position (taken from that tag).
I found out about OGMO because I was working with an actionscript library called FlashPunk. When using that library, you could easily loop through all the "tile" tags with a for each loop. I can't seem to find a way like this with unity.
How would you write a script that could do what I have described? Thanks in advance!
Answer by ckfinite · May 19, 2011 at 08:40 PM
To give a basic overview as to what I would do is I would write a SceneLoader script that would loop over the XML files. Unity gives you the System.XML namespace, so you could use that in C# to open and read the XML.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Instantiate GUI text 1 Answer
Terrain with lots of objects 1 Answer
cannon script is not working, no errors. 1 Answer
object count cap? 1 Answer