Hello,
probably the title is too short to give you a clear idea of what I want to create.
Basically I want to be able to load from a folder (or web location) meshes, textures or other things like audio or video, after the game was succesfully compiled. With particular attention to meshes, I would like that those meshes will have some components attached in automatic to them, once they are loaded in the game.
I’ll give you a practical example of what I just said.
I have an empty box in my game, that could be filled (after a click on a button, or in automatic, doesn’t matter I guess) with meshes imported from a folder (the game at this stage, I repeat, is already compiled). I create a simple mesh called “sphere.fbx”, and I save it into the folder that should be linked to the game. If I click the button, right now, that mesh should appear inside the box.
But that’s not all yet. I need to understand if that object is, for example, a sphere, a cube, or a cone (checking the filename, or a tag, no idea how it’s possible to achieve this), and then, apply in automatic the right component (like a mesh collider, for example, or a script created by me, or just a material… like for example, a yellow material for the sphere, a purple material for the cube… etc…).
That’s it.
Now, I basically know how to do this stuff, the problem is that I’ve to do everything in runtime… and I probably have to use the “AssetBundle” stuff (I guess) which I have no idea how to use it.
Oh, and I have to do this in Virtual Reality… I don’t know if this will change something… but at least my application will run just on PC and not on mobile.
Not yet.
Hope that someone will help me…
Thank you!