Sign in to follow this  
  • entries
    375
  • comments
    1136
  • views
    297572

A small XNA tip

Sign in to follow this  

83 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now