how do you load files in windows phone 7? using XNA
Posted
by matt
on Stack Overflow
See other posts from Stack Overflow
or by matt
Published on 2010-06-17T00:56:32Z
Indexed on
2010/06/18
1:43 UTC
Read the original article
Hit count: 260
windows-phone-7
do you seriously have to make your own content pipeline project for every single type of file you want to load?
Microsoft just seem to be pretending that the iphone doesn't exist (even though they are now paying devs to port between them). I'm trying to port my game from the iphone to winmo7, and I already have a nice asset pipeline set up for exporting textures in the exact format we want (16 bit fmts ect)
I just want to be able to open a file and read it, just like I would on any other platform.
I have tried System.IO.File.OpenText("atextfile.txt"), but it says that function is "RESTRICTED!!!!" I have tried just adding the txt file to the content project, setting its properties to "content" and "copy always" and then trying to open it doing this.Content.Load("atextfile.txt");
with and without the extension, says it can't find the file.
EDIT:
FYI, i'm using XNA, not Silverlight
© Stack Overflow or respective owner