开发者

How to load content when hosting on win forms? [closed]

开发者 https://www.devze.com 2023-03-22 22:48 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

Improve this question

I'm trying to host xna into windows form. But when I use "Content.Load":

spriteFont = content.Load<SpriteFont>(@"Content\Fonts\smallFont"); 

it gives me an error:

File not found.

I think this is because I have no "Co开发者_开发技巧ntent reference" in my win forms project.

My question is: How can I load content when hosting xna on win forms? Or how to add "content reference" into win forms project?

thanks!


Here is a good tutorial on how to use XNA in WinForms, plus load content.

XNA WinForms

0

精彩评论

暂无评论...
验证码 换一张
取 消