Even if you are still a little fuzzy on what an FFT does and how it does it really will become more clear after we look at a completed example. Since this is more of an advanced topic, we will actually look at a completed example first and then break it down to see how it works. Follow the instructions given to add the chapter assets to a new Unity project:
- Open up Unity and create a new project called
GameAudioVisualizations
. - From the menu, select
Assets
|Import Package
|Custom Package
and then use theImport Package
dialog to locate and import theChapter_8_Start.unitypackage
found in theChapter_8_Assets
folder of the downloaded source code. - After the assets are imported, locate the
Chapter_8_Start
scene in theProject
window and double-click to open it. - When the scene has finished loading, press play to run it. As the scene plays, listen carefully and watch the colored cubes as they grow and shrink with the music. The following is a screenshot of the scene...