How to load multiple textures and sounds

10 views
Skip to first unread message

Paul

unread,
Jan 15, 2013, 3:51:00 PM1/15/13
to unity3d...@googlegroups.com

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;

  1. 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

  2. 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)

  3. 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

Reply all
Reply to author
Forward
0 new messages