如何在 Monogame Windows Phone 8 游戏项目上设置 xnb 文件? [英] How to set xnb files on Monogame Windows Phone 8 Game project?

查看:21
本文介绍了如何在 Monogame Windows Phone 8 游戏项目上设置 xnb 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从来没有找到任何教程来制作 xnb 文件.他们都使用非 Windows Phone 8(Win 8 Metro 等)方式.

I never found any tutorial to make xnb files works. They are all using non Windows Phone 8 (Win 8 metro, etc) way.

有人可以指导我使我的 xnb 文件在 MonoGame Windows Phone 8 游戏项目中可用吗?因为我用谷歌搜索没有任何好处.

Can someone guide me to make my xnb files workable at MonoGame Windows Phone 8 Game project? Because nothing I googled is doing any good.

另外,我可以使用 XNA Windows 游戏项目(使用 VS 2010)创建 XNB 还是需要项目是 Windows Phone 游戏(我还没有安装 WPhoneSDK 7.1,但在 VS2012 中安装了第 8 个)

Also, can I create an XNB using XNA Windows Game Project (with VS 2010) or does it need the project to be Windows Phone Game (I haven't Installed WPhoneSDK 7.1, but have installed the 8th in VS2012)

到目前为止我使用了几种方法并不断导致 Microsoft.Xna.Framework.ContentLoadException

I so far use several ways and keep resulting in Microsoft.Xna.Framework.ContentLoadException

谢谢

推荐答案

  1. 使用 XnaContentCompiler 将资产编译到 xnb 中.

  1. Compile the assets into xnb's using the XnaContentCompiler.

将文件放在使用 MonoGame 模板创建的内容文件夹中.

Put the files in the content folder that is created with your MonoGame template.

将属性更改为 Build Action = Content 并复制到 Output Directory = Copy if Newer.

Change the properties to Build Action = Content and Copy to Output Directory = Copy if Newer.

做你平常的事var t = Content.Load(@"TextureName");.

这篇关于如何在 Monogame Windows Phone 8 游戏项目上设置 xnb 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆