How to set xnb files on Monogame Windows Phone 8 Game project?

空扰寡人 提交于 2019-12-04 01:52:33

问题


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:


  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");.



来源:https://stackoverflow.com/questions/16228362/how-to-set-xnb-files-on-monogame-windows-phone-8-game-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!