A small XNA tip

Published January 12, 2008
Advertisement
I've been playing with the content pipeline stuff, particularly with regards to processing and loading my own custom objects. To make it easy I'm using XM.

One of the things that was bugging me was that one of my objects contained a dictionary of subobjects, and the XML for it wasn't very pretty:
   subobjectName        


After much mucking around with Reflector and the documentation, I found Microsoft.Xna.Framework.Content.ContentSerializerAttribute, which has a number of properties, including 'CollectionItemName.' Changing my dictionary to a list and applying this attribute has produced a much nicer result:

    


On a related note, this is the first time I've actually used Reflector, and I'm amazed. It's a truly awesome tool if you're doing .NET work.
Previous Entry Downtime
Next Entry Uh
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement