Error load , File not found

 

Error loading "GameThumbnail.png". File not found.

Texture2D  mBG = Content.Load<Texture2D>("GameThumbnail.png");

我不论是把图片放到项目根目录还是Debug/Release下,依然是这么说:

图片只有放在项目资源管理器内的"Content"内才能找到AssetName属性。然后要注意的就是Content.Load针对的是Content内的AssetName来读取图片信息的。方法就是把图片放到Content下右键点“属性”。希望这点以后能给各位和我遇到同样困扰的人一个捷径。

1. 资源都是通过Asset Name来访问的,不是通过文件名.

2. 这样写资源管理器

  ContentManager content;

 content = new ContentManager(Services, "Content");

 

posted @ 2009-03-19 11:36  信息化建设  阅读(640)  评论(0编辑  收藏  举报