I'm developing an engine in XNA and would like to have two different ContentManagers: one for the game (sprites, sounds, etc.) and one for the engine (shaders, dlls, etc.)
Right now, I have this:
using Microsoft.Xna.Framework;
....
public class Engine
{
public ContentManager GameContent;
public ContentManager EngineContent;
public IServiceContainer Services = null;
public Engine(GraphicsDeviceManager Graphics, ContentManager Content)
{
Services = new ServiceContainer();
Services.AddService(typeof(IGraphicsDeviceService), Graphics);
Services.AddService(typeof(IGraphicsDeviceManager), Graphics);
GameContent = Content;
EngineContent = new ContentManager(Services, "EngineContent");
...
}
}
The GameContent and EngineContent projects root directories are set to GameContent and EngineContent, respectively. I have a content reference to EngineContent in the Engine project and references to both GameContent and EngineContent in the Game project.
Why can I access my GameContent but not my EngineContent?