I’m Using Unity 2018.3.5f1 and FMOD 2.00.
After I’ve imported integration package, I’ve tried to do a basic ambient sound.
I’ve created 2D event in Studio and assigned it to a cube object in-game. Everything works fine and sound plays as it should.
However, when I add automation parameter for event’s volume, nothing is playing.
I’ve added “User: Continuous” parameter with 0 to 1 value. It regulates track’s volume. Seek speed is at 0.50/s.
In unity I’ve created cube object with removed mesh filter & renderer.
I’ve added Studio Event Emitter & Studio Parameter Trigger. Initial value is 0. When player enters trigger zone, it should raise to 1 which should bring volume to 0db.
But nothing happens, meter shows -80db, as if nothing is playing when I enter trigger zone. If I remove automation from Studio and just use Event Emitter with no parameters, everything plays as it should.
A few things could be happening, I could use a bit more information on these:
In FMOD -
Is the sound set to loop? If not, maybe it’s ending before you get into the trigger zone.
Does the volume automation work in FMOD studio when you change the parameter?
In Unity -
Is your Player game object tagged “Player”?
Is the cube volume set to IsTrigger?
Does the Player game object have a Rigidbody? If not, make sure the cube has a Rigidbody with IsKinematic set to True. In Unity, one or both of the game objects needs to have a Rigidbody for OnTriggerEnter messages to be sent
You can make sure Trigger Messages are being sent by making a new C# script, add it to the cube object, and put this after Update:
void OnTriggerEnter(Collider other)
Debug.Log(“Player Entered the Trigger Zone”);
And check the console when you enter the trigger zone.
I found the solution for my specific case.
In Unity Project Settings/Physics I had to tick the checkbox in Layer Collision Matrix, so that AudioColliders would interact with our character.