XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

opening files added to "Content" project

Last post 18/05/2009 19:44 by MJP. 2 replies.
  • 17/05/2009 5:41

    opening files added to "Content" project

    I recently realized that File.OpenRead("Content/FileName.file") opens the file and i'm able to do anything with it.(On the XBOX even) Is this a viable technique or is there something wrong with my Xbox?

    And if so, why didn't I know about this? How many other cool little things don't I know about XNA? (Thats rhetorical) (unless someone actually knows something cool that most people don't realize lol)
  • 18/05/2009 19:03 In reply to

    Re: opening files added to "Content" project

    While you can do that, it'll make things more difficult then just using the ContentManager.
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 18/05/2009 19:44 In reply to

    Re: opening files added to "Content" project

    Yup, you have full access to the File I/O stuff and even the XML serialization stuff.  If you have some content for which you don't have an importer/processor, it's perfectly viable to add it to the Content project (make sure you set it not to compile, and to always copy the file to output) and then just directly load up the file.
    Matt Pettineo | DirectX/XNA MVP


    Ride into The Danger Zone | PIX With XNA Tutorial
Page 1 of 1 (3 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG