0

I have some problems with loading from path a model.

axis = Content.Load<Model>("XYZ");

I try to change it to :

axis = Content.Load<Model>("C:\\XYZ");

But it gives me this error :

Error loading "C:\XYZ". Cannot open file.

I also googled that thing, but I found nothing, looked at this question : How Do I Load A XNA Model From A File Path Instead Of From The Content (eg. Model.FromStream but it doesnt exist) , but it didn't help me.

Community
  • 1
  • 1
NicusorN5
  • 3
  • 4

1 Answers1

0

In the properties of your content project, you specify a root folder in your project. When content is built, it is placed in your bin\content directory matching the hierarchy of your content project.

Content is local to your content project, not absolute on disk. Loading an unprocessed model from an absolute path will not get your a model inside of XNA like you expect.

Jarryd
  • 572
  • 4
  • 13