- Home /
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 simply instantiate them during run time. Search for instantiate in the Unity manual and you will get good results.
Answer by BerggreenDK · Mar 19, 2012 at 07:40 PM
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) http://bit.ly/yPJvTU
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.
Your answer
Follow this Question
Related Questions
Load a scene/level when enemy is close... 1 Answer
How to load a scene on collision 1 Answer
Load Scene When... 1 Answer
Setting variable as type "Scene" 4 Answers
The best way to load scenes ingame 3 Answers