The script has been written so that it is easy to have multiple visualizations in a scene. So, to create a second visualizer for a second audio clip in the scene, perform the following steps:
- Duplicate the visualizer GameObject.
- Drag a different audio clip from the Project panel into the AudioSource component of your new GameObject.
- Set the startY public parameter in the Inspector panel to 60 (so that the new row of cubes will be above the original row).
- In the Inspector panel, choose a different Display Color public variable for the SpectrumCubes (Script) component:
![](https://static.packt-cdn.com/products/9781839217616/graphics/assets/6de4fed6-6904-4392-b792-3aae502cebdc.png)
Figure 4.6 – Two visualizer GameObjects in play mode