XNA动态加载内容 [英] XNA load content dynamicly

查看:84
本文介绍了XNA动态加载内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行时将本地文件(不包含在项目中)加载到我的模型中.

我正在尝试这种方式:

I''m trying to load a local file (not included into project) into my model during the runtime.

I was trying this way:

myModel = Content.Load<Model>("C:/MyModel.fbx");


这是行不通的.正确的方法是什么?


It does not work. What is the correct way?

推荐答案

您的Content.Load语句是否位于LoadContent()方法内?请查看以下链接中的代码,然后交叉检查您在做什么:
Is your Content.Load statement inside the LoadContent() method? Please take a look at the code in the following link and cross check with what you are doing: http://msdn.microsoft.com/en-us/library/bb197293(v=xnagamestudio.31).aspx[^]


这篇关于XNA动态加载内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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