
上QQ阅读APP看书,第一时间看更新
Adding visualizations to a second AudioSource
The script has been written to be easy to have multiple visualizations in a scene. So to create a second visualizer for a second AudioClip in the scene, do the following:
- Duplicate the visualizer GameObject.
- Drag a different AudioClip from the Project panel into the Audio Source component of your new GameObject.
- Set the Start Y public parameter in the Inspector to 60 (so the new row of cubes will be above the original row).
- In the Inspector, choose a different Display Color public variable for the SpectrumCubes (Script) component:
