Sign in to follow this  

[XNA] Intermediate Serializer not writing all the data.

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:

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

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:

[code]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

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

Sign in to follow this