- Home /
Loading of assets during runtime
So I am trying to create a self contained application in which I maintain an object model so I can switch out models, textures, sounds during run time and overlay them on to my players model. As part of this I have a simple init method to create the object model and in it it loads things such as the ship hulls available in the game and some stats on them. I want to also load the sound, texture, and model into the Hull class so I can then just have the PlayerShip game object using the current select Hull for it's information on drawing itself on the screen and what scripts it uses. I have found in the api where I can load from a resources folder or from an external web site. What I really want to do is keep my existing heirchy intact without just shoving everything into a resources folder. Is there a way to access the information without destroying the logic of my layout?
An example of this would be in my init
playerHulls.Add ("Heimdall", new Hull ("Heimdall", 10, 0, FooModel, FooTexture));
where my current layout is
/Assets/Models/PlayerShips/HeimdallShip
/Assets/Textures/PlayerShips/HeimdallShipTexture
Your answer
Follow this Question
Related Questions
Export objects to a .3DS file at runtime 1 Answer
Loading subassets at runtime 1 Answer
reimporting at runtime? 0 Answers
How can I display an Asset Store within game? 0 Answers
how to add models dynamically at runtime in unity web output? 1 Answer