- Home /
How to load multiple textures and sounds
Hi All
I'm fairly new to Unity and C# but I am developing a game which is coming along quite nicely. What I'm looking for here is some advice from those in the know.
My games is based on users selecting the correct object based on a question and then moving onto the next. In order to develop the game I simply attached different textures to public variables in the inspector and these are assigned at run time. The game play is now working as I want and I need to move on to developing it into a more comprehensive game.
Each object could have 1 of 4 possible textures rendered onto it and one of 2 possible sounds associated with it. In all there will be 500+ of these objects available. From reading up on it I can see 3 possible ways of doing this;
Continue as I am and make these available in the inspector and assign them at design time. This will be time consuming (but that's not a problem) but more importantly means that the whole game has to be udated to change any of them. This may not really be an issue as I don't seem them changing very often
Put them in the resources folder and load them in code. This should be quicker to design and possibly update, assuming I can copy in new files via the program (somthing like an ftp update perhaps)
Have a server SQL database which I can query and update via server side scripts (happy enough that I can do this with the WWW class, I think, providing I can do the graphics and sound file). This would allow a lot of flexability for udates, additions etc.
So (Finally) my question is
Based on your expertise and experience what is best way to do this, bearing in mind performance foremost and ability to update secondary
thanks Paul
Two more possiblities to take a look at: Asset Bundles and Editor Scripts.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090903im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I merge 2 Normal Maps into a single Normal Map at runtime? 0 Answers
Export objects to a .3DS file at runtime 1 Answer
Why are my textures black at runtime? 2 Answers
Assigning textures in project panel to materials dynamically or via editor scripts 1 Answer
How to add Textures to other textures during runtime 0 Answers