Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to load a local file (not included into project) into my model during the runtime.

I was trying this way:
C#
myModel = Content.Load<Model>("C:/MyModel.fbx");

It does not work. What is the correct way?
Posted
Comments
Richard C Bishop 7-Nov-12 15:07pm    
Are you getting any error messages?
Rddezh 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

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[^]
 
Share this answer
 
Comments
Rddezh 8-Nov-12 13:44pm    
Yes this statement is inside LoadContent(), because I did it following this tutorial :D
Mark Vinod Sinnathamby 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900