Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Dec 2011
    the rez

    Post XNA vol 2: Actor Demo problem with Content.Load (File not found)

    Hi folks, so I'm working through XNA vol 2 and I'm in the Actor Management Demo video. Using XNA 4.0 and Visual Studio 2010. I'm getting a file not found, which I can't figure out since it seems like it should be in the right place but clearly something is wrong.

    I have a Textures folder that I added via the Solution Explorer, so its location is:

    ...visual studio 2010\Projects\ActorManagementDemo\ActorManagementDemo\ActorManagementDemo\Textures
    In that folder I have my player.png: Click image for larger version. 

Name:	mVy8e.png 
Views:	237 
Size:	14.5 KB 
ID:	72409

    My code is this, though I have tried many variations:
    Content.RootDirectory = "Content"; 
    player = new Player(Content.Load<Texture2D>(@"Textures\player"));
    Player accepts a Texture2D so I'm just passing it over. I've tried many variations, but I'm thinking that it's not looking in the right directory to begin with. Where is the "Content" directory exactly? I have (and still am) researching this problem but so far I haven't come across a solution (though if I do, I'll post it here).

    Could someone help me figure this out?
    Last edited by mandismash; 01-19-2012 at 10:26 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts