Script: import a 3d model to the scene from an outside folder

Hello everyone,

I’m still a beginner to unity3d and I have a question about how to import a 3d model from outside the assets folder.

For the need of my client, I have to read a xml file (stored outside the assets folder at a fixed path) in order to retrieve several information for each 3d model (position, rotation, scale and so on).

My client wants to store all fbx models outside the assets folder in order to change 3d models anytime he wants after exporting the project (plateform will be Windows).

As a result my project (scene, script, everything in the assets folder) will be pretty empty except some script in order to manage the xml file.

I’ve already succeeded to load a texture stored outside the assets foilder and set it to a model which was added to the scene manually.

My question is: knowing the fbx file path (eg: c:/models/target.fbx), can I import the fbx model and put it to my scene by script?

Every data will be stored oustide the assets folder, and so far when searching to the internet I find nothing for importing a 3d model to the scene by script.
So far I only know how to add a prefabs into my scene when having a GameObject set (Instanciate(myGameObject):wink:

Could you please tell me if my client request is possible? (I’m willing to use C# script)

I really thank you in advance

Look Here: Importing Mesh from script

Note a model is a collection of objects rather than being one item. you could render a whole scene in one .fbx if you wished. you could hook up each item to their corresponding renderers i.e. for meshes and materials.

For Unity Documentation this maybe of interest.