Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 XNA 中做一个 RPG 编辑器,问题是我需要从 XMAL 文件中写入的路径加载纹理。
我做了一些研究,但大多数解决方案都在改变内容管道或只是创建自己的。
尝试这个:
FileStream filestream = new FileStream("mytexture.jpg"); Texture2D myTexture = Texture2D.FromStream(graphicsDevice, filestream);
Texture2D.FromStream
免责声明:我没有测试过这段代码(这台电脑上没有安装 xna)。