x


Generate map from XML

Hi guys ^^. I have to do a map generator to load variables from a XML. Anyone have any script that reads any variable and then use it, for example, to resize a box?:

A xml, for example:

<stage>
   <cube positionX = 0 positionY = 1 size = 2>
</stage>

And then, with a script in Unity, use these variables for create a cube in the position 0,1 and size 2x2? Anyone know how to do it? Thank you very much ;D

Sorry for my english.

more ▼

asked Dec 11 '11 at 04:22 AM

Raikoon gravatar image

Raikoon
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

http://forum.unity3d.com/threads/25352-Loading-an-XML-file

Btw. XML attribute-values should be surounded with quotation marks (") or you will get in trouble depending on the xml parser you use and what values you store in the attributes.

AFAIK there's no ready-to-use script around so you have to interpret your xml yourself, but it shouldn't be that difficult.

more ▼

answered Dec 11 '11 at 04:31 AM

Bunny83 gravatar image

Bunny83
45.4k 11 49 207

Thank you mate ^^

Dec 11 '11 at 08:42 AM Raikoon
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3742
x256
x200
x38

asked: Dec 11 '11 at 04:22 AM

Seen: 1087 times

Last Updated: Dec 11 '11 at 08:42 AM