Unity version: 2022.2.21f1 (also tried upgrading to 2022.3.5f1)
FMOD version: 2.02.16 (also tried 2.02.15).
Here is the problem:
- Created an attack event, which is a multi instrument with 2 sounds.
- I added “Pitch Shifter” effect to master track of the event.
- I added automation to “Pitch” value, which looks like this (“IsAttackCritical” is a Discrete parameter, ranging from 0 to 1, “Hold value until playback” is unchecked):
- I tested the sound in FMOD Studio, when IsAttackCritical == 1, it lowers the pitch, otherwise the sound is default. Seems like everything is perfect, when testing in FMOD Studio.
- Went to Unity, and launched this event from my project like this:
EventInstance instance = RuntimeManager.CreateInstance(eventToPlay); // eventToPlay is an EventReference instance.setParameterByName("IsAttackCritical", IsCritical ? 1 : 0); instance.set3DAttributes(RuntimeUtils.To3DAttributes(soundPos)); instance.start(); instance.release();
The bug: Sound is played successfully, but the pitch never changes as if “IsAttackCritical” is always 0.
What I’ve tried:
instance.setParameterByName()to see whether the parameter has been set to 1 successfully.
- Checked RESULT for every single function that returns it. Got “OK” everywhere.
- Tried setting FMOD log level to “Log”. Nothing suspicious there.
- Checked that the parameter Velocity is 0/s and Seek speed is “Instant”.
- Tried setting “IsAttackCritical” Initial Value to 1 and not setting it via code at all, still sounds as if IsAttackCritical is set to 0.
- Tried reinstalling both FMOD Studio and FMOD Unity.
- Tried just doing the same thing from scratch (creating new event, new parameter etc.).
Is this an FMOD bug or I haven’t checked something on my side that I need to?
Thanks in advance!!!