So basically I am making a small test game and I have a class that is used in the creation of all the entities in the game so I pass the class on to the object Player and run this code:
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
font = Content.Load<SpriteFont>("LCD");
Player.Sprite = Content.Load<Texture2D>("Sprites/Player");
}
But for some reason, every time I attempt to debug and run it, it gives me an error which is weird because before the error did not show and it would run fine, here is what the error says:
ContentLoadException was unhandled
Could not load Sprites/Player asset as a non-content file!
I have a folder within the content folder named "Sprites" which does exactly as its names suggests, holds my sprites, and all the spelling is done correctly. I cannot figure out why this problem persist though.
Check your string for errors. If I'm correct I saw this error a lot when I capitalized something that shouldn't have been.
String:
"Sprites/Player"