The first was the original structure of the app meant that every single sound available could be played at once however I needed to make sure that when you played one sound in a row (a row is a row on the keyboard e.g. Q>W>E>R>T) so this needed a new bit of coding. The original app frame work runs on a series of IF statements and true/false statements, I realised I could elaborate this to make one button turn off the others.

The code essentially says if they key (D in this case) is pressed and sound e FX is not playing (false) make it start playing (true). So I added to that if that it makes all the other corresponding FX clips stop playing (making them false).
Although it was a bit longwinded it was just a series of copy and pasting and referring to the sRen numbers for the video bank. This solution worked very well in solving the problem.
Another problem I encountered was very large project sizes which intern led to build problems. This was because I was working from an app foundation that would not work on this scale. unity decompresses all PNG sequences when you import them so file sizes shoot up. This lead to huge files sizes. Whilst using the animator in unity I realised you could add key framed properties to both stills and png sequences. This meant instead of rendering everything before hand and importing them as image sequences I could import large single images which could be moved in unity. This brought my app build down from 25gb > 2gb.
No comments:
Post a Comment