Transition between different soundtracks based on object collisions.
- Create cube objects for each transition and an empty AudioDJ object to keep track of global variables.
- For each transition cube object, attach
Trigger.cs
and Mesh Collider as a component. Add 2 Audio Source components, one for the transition music and one for the actual soundtrack. - Link the two audioclips to the
Trigger.cs
script in the Inspector.