Advertisement Jump to content
Sign in to follow this  

[XNA] Intermediate Serializer not writing all the data.

This topic is 2650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So i'm having this problem for a while and don't know where to look.

I'm using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate to serialize / deserialize a few things, and so far it worked great.

But now, i did a level editor and it doesn't seem to write the data properly for my tiles. All i get is:

<XnaContent xmlns:WorldClasses="XRpgLibrary.WorldClasses">
<Asset Type="WorldClasses:MapData">
<Item />
<Item />
<Item />
<Item />

As you see, the Item fields are all empty when they should contain some tile values. Everything else works perfectly.

Even if i debug my game step by step, i can see that the right data is passed to the Serializer; it just doesn't seem to write them! :S (Check screenshot at the end)

Here's my Tile class, just in case:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XRpgLibrary.TileEngine
public class Tile

#region Field Region

int tileIndex;
int tileSetIndex;


#region Property Region

private Tile()

public int TileIndex
get { return tileIndex; }
private set { tileIndex = value; }

public int TileSetIndex
get { return tileSetIndex; }
private set { tileSetIndex = value; }


#region Constructor Region

public Tile(int tileIndex, int tileset)
TileIndex = tileIndex;
TileSetIndex = tileset;



So anyway, as you can see, the data is passed properly and in that case, should have these values in XML:


So i know it's a lengthy post, but i'm pulling my hair at this. If anyone has any ideas, please let me know!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!