The audio reactive export pipeline to Unity is fantastic but I would like each Tilt Brush object to have and react to its own audio source.
Digging in, I found VisualizerAudioInput.cs with this invitation in comments:
//Get audio data from Unity (Hint: replace this with your own!)
The line in question is:
AudioListener.GetOutputData(m_WaveformFloats, 0);
I know that I can get the current audio source (not Listener) data by using AudioSource.GetOutputData but here are my questions:
- Will that refer to just the source on that GameObject or any playing source?
- If we think it will work with some extra code, can someone give me the correct code? (not a c# coder myself)
- Can I put this revised code on each gameobject/source or is the Tilt Brush audio reactive code designed to occur only once in a Unity scene?
I will try a hack myself and if it works, pass it along here.
Thanks!