Hi I would like to have a character creation system on my scene. Im trying to figure out how I can have this dynamic while starting the game. I know in c# you can create objects with C# GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); How can I do something like this with C# but to load an external character from my harddrive? ie. I would like to load meshes/pbx in the game from another directory. How can that be achieved?
Is there any particular reason that you need to pull them from other directories on your hard drive? I think it would be more efficient and practical to import your models into Unity directly. Once you have them imported, you can create prefabs of them which can be instantiated as needed through scripting, or dragged directly into your scenes.
By putting them in your resource folder, you can load meshes with Code (csharp): Resources.Load() . Alternatively, you could look into AssetBundles (much better...) But, still it would be much easier to have everything imported in Unity and make prefabs. Why would you want to load them externally, anyway?
I would like to create a game that can be expanded in future to buy maybe more guns from a shop that has new fbx model. This way I dont have to recompile the game and make people download it. Is this possible with Unity3d? If so Im really interested. There is something called WWW.LoadFromCacheOrDownload which looks like it can do something but Im not sure how to handle pbx files and prefabs with this.
@gudula, I would use asset bundles for this. A good place to start learning about them is here: http://unity3d.com/learn/tutorials/modules/intermediate/live-training-archive/unity5-asset-bundles Note: you will have to compile the asset bundles, if done right, your players won't have to re-download the game each time. (Unless you have new code)