无法加载图片。 FileNotFoundException Suraface Surface Application XNA [英] Cannot load image. FileNotFoundException Suraface Surface Application XNA
问题描述
它说它在这个目录中不存在但是路径没问题且它存在于此文件夹中但它仍然给我FileNotFindExecption。有谁知道为什么?
It says it does not exist in this directory but path is ok and it exist in this this folder but it is still giving me FileNotFindExecption. Anyone knows why? 这是我的代码: spriteBatch = spriteBatch = new / /我试过这个 //I tried this one
// planeTextu re = Content.Load< Texture2D>(" Resources \ plane"); // planeTexture = Content.Load<Texture2D>( "Resources\plane"); //这一个并且都不起作用 planeTexture = planeTexture = Texture2D 。FromFile(graphics.GraphicsDevice, Texture2D.FromFile(graphics.GraphicsDevice,
@"Resources\plane.png");
drawingArea = drawingArea = new new
Rectangle(graphics.GraphicsDevice.Viewport.X + 100,
graphics.GraphicsDevice.Viewport.Y + 100, graphics.GraphicsDevice.Viewport.Y + 100, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Width, graphics。 GraphicsDevice.Viewport.Height); graphics.GraphicsDevice.Viewport.Height); 谢谢 我想知道你解决了这个问题吗? I am wondering do you fix this issue? 我遇到了同样的问题。如果你修好了,你介意与我分享你的经历吗?我的电子邮件是angela.chenying@hotmail.com。谢谢! I met the same problem. If you have fixed it, would you mind share your experience with me? My email is angela.chenying@hotmail.com. Thanks! 这篇关于无法加载图片。 FileNotFoundException Suraface Surface Application XNA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
SpriteBatch (GraphicsDevice);
@" Resources \ plane.png" );
矩形 (graphics.GraphicsDevice.Viewport.X + 100,
推荐答案