0
实际上,我试图作出对窗口 这里显示一些图像节目是部分代码AssetNotFoundException在SharpDX
public Texture2D tulTexture;
//...
protected override void LoadContent()
{
// Instantiate a SpriteBatch
spriteBatch = ToDisposeContent(new SpriteBatch(GraphicsDevice));
// Loads the balls texture (32 textures (32x32) stored vertically => 32 x 1024).
// The [Balls.dds] file is defined with the build action [ToolkitTexture] in the project
tulTexture = this.Content.Load<Texture2D>("T.jpg");
// Loads a sprite font
// The [Arial16.xml] file is defined with the build action [ToolkitFont] in the project
base.LoadContent();
}
当我运行的程序,我得到了AssetNotFoundException但这是谎言。我有这个资产!
请发布完整的StackTrace。 – Leistungsabfall 2014-09-28 19:39:03
我在一段时间后遇到了同样的问题。进入SharpDX代码并观察它构建它试图打开的文件的路径是有帮助的。 我也看到这从没有设置图像文件的正确的构建行动 - 它需要是ToolkitTexture。 – NSFW 2014-11-03 23:25:13