will
will

Reputation: 1407

Silverlight 5 - .XNB File location

I'm using the Silverlight 5 Toolkit (That basically lets me do XNA in Silverlight). The problem is that the XNB files that I'm generating from image files, are being stored in the .XAP File, instead of letting me just load the XNB files from the webserver. This will become a problem when I started having a ton of images. Is there any way for me to force it to -not- load the xnb files into the XAP file, and to instead look in directories on the web server?

Upvotes: 1

Views: 434

Answers (1)

MyKuLLSKI
MyKuLLSKI

Reputation: 5325

Sure why not. Keep in mind XNB files are XNA compiled files. In order to create these they must be compiled somewhere somehow, but the good this is you can create a Content project that only contains your textures, sounds, etc.

Process

  1. HttpWebRequest to download the XNB files from your webserver
    • This will return a stream.
  2. Texture2D.FromStream() to create a Texture2D from the image you downloaded

Upvotes: 2

Related Questions