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

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

问题描述

我从未找到任何使xnb文件正常工作的教程.它们都使用非Windows Phone 8(Win 8 Metro等)方式.

有人可以指导我使我的xnb文件在MonoGame Windows Phone 8 Game项目中可用吗?因为我用谷歌搜索都无济于事.

此外,我可以使用XNA Windows游戏项目(与VS 2010)创建XNB还是将其作为Windows Phone游戏(我尚未安装WPhoneSDK 7.1,但已在VS2012中安装第八个)? >

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

谢谢

解决方案

  1. 使用 XnaContentCompiler 将资产编译为xnb.

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

  3. 将属性更改为Build Action = Content,然后将其复制到Output Directory = Copy if Newer.

  4. 做正常的事var t = Content.Load<Texture2D>(@"TextureName");.

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

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.

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)

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

Thanks

解决方案

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

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

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

  4. Do your normal thing var t = Content.Load<Texture2D>(@"TextureName");.

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

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