I'm running into a lot of trouble while attempting to streamline XNA texture loading. I've given up on dynamically loading textures from a specified directory, so now I'm just trying to work with an organized collection of folders in the solution's content. I'm trying to use the following line of code:
Content.Load<Texture2D>(".\\Graphics\\Characters\\Char1");
"Char1" is the correct asset name, and it is stored in "Graphics\Characters" under Content in my solution explorer, but it still throws a "file not found" error. What am I doing wrong here?
EDIT: Turns out the debug bin folder created the wrong directory stucture: \Graphics\Characters\Characters. Thanks for the help regardless!
System.IO.Path
, for example) and using that file listing, stripping the.xnb
extensions, to dynamically load an entire directory of assets. – Andrew Russell