Load 3d models with code, possible?

Hi Everyone.
I wonder if it is possible to load in characters in to the scene without put them into a scene? Because I need to be able to load in two diffrent characters.

Thank you in advance. Sorry if I describe my problem bad.


You can do many things.

If the models are part of the project file from when you compile the game/project, you can just embed them as Prefabs or normal assets. Then use Ressource.Load (as mentioned above)

If you dont have the objects when the game is released, but the objects are to be developed later than the game. You can either distribute a new version of the game (easy with webplayer and Apps), but you can also use the “open format” called .OBJ - its more or less a raw-text based format and if you search for it there are both examples that WRITE/GENERATE them and examples that READ them in run-time (while the game is running).

Search for .OBJ and Unity3d. I believe I saw both load and save .OBJ samples on a Unity Wiki page.