Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Serialising XML Resource into Class.

$
0
0

Hello,

I'm trying to convert my XNA project into Xamarin Android and finding when I attempt to load the content an exception is thrown.

Taking a snip of code I have:

        public Level[] Levels;
        Texture2D sprite = Content.Load<Texture2D>("backgroundkitchen");
        Levels = Content.Load<Level[]>("Level");

The second line is fine, and the Level.xnb file is sat in the same place as the backgroundkitchen.xnb file. The third line causes the issue.

Level is a type defined in the same namespace.

It's possible I'm missing something obvious and not related to the conversion - but I'm new to Xamarin so I could also need to do it in a slightly different way than I was in the XNA project.

Any help is appreciated, thanks!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>