hi,
i am trying to write all the data for my games level to an xml file using c# xml serializer.
i got it to work but for any of my classes below the Level class none of the fields are written.
for instance, a Level has a List of Ball objects and a list of brick objects (guess theres not too many hints about what kind of game it is lol)
each file has fields that i marked with
[xmlattribute] or [xmlelement] or [xmlarray] ect. when i output the file, there are <Ball \> tags for each ball and <brick \> tags for each brick.
what i would like to see is something like:
<Level name="level1>
<Ball x="0" y="1" \>
<\level>
something alpong those lines, where the element and attribute tabs of the Ball class are writted to the file as well.
The attributes, elements and arrays and things from the Level class are all written corretly.
is there some special way that i need to setup the serializer for it to look into these seperate calsses for the serialization??
thanks alot,
ken