Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# 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?
Posted 7-Nov-12 7:59am
Rddezh373
Comments
richcb at 7-Nov-12 15:07pm
   
Are you getting any error messages?
Rddezh at 8-Nov-12 5:02am
   
I don't get any error when I compile code. But when I call this line I get message "File not found".

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Rddezh at 8-Nov-12 13:44pm
   
Yes this statement is inside LoadContent(), because I did it following this tutorial :D
markFaction at 9-Nov-12 14:00pm
   
What is the error or exception message you are getting?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 310
1 Sergey Alexandrovich Kryukov 176
2 PhilLenoir 164
3 Richard MacCutchan 160
4 Sharmanuj 146
0 Sergey Alexandrovich Kryukov 6,077
1 OriginalGriff 5,115
2 CPallini 2,473
3 Richard MacCutchan 1,597
4 Abhinav S 1,505


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100