Loading content from subfolders
A common pattern in XNA games is to nest a "Content" folder inside the main game project, to keep things organized. We do this in all the samples available on the creators.xna.com site, for instance.
When you come to load a piece of content, you have to write:
or as some people prefer:
Did you know there is an easier way? You can specify a root folder in the constructor where you initialize your ContentManager. Change this line from the standard game template:
to:
Now you can load content without bothering to specify the root folder:
So why don't we do this in our samples, or even build it in to the default game template?
Great question! I guess we just didn't think of it in time :-)