I’m having trouble getting
EventInstance.setPropertyByName() to have any noticeable effect.
In our FMOD Studio project, changing the value of our continuous parameter results in changing the music as intended. Also, in Unity inside the Event Browser, changing the value using the provided slider updates the sound as expected. In code though, updating the value seems to have no effect.
Starting the event instance:
EventInstance = FMODUnity.RuntimeManager.CreateInstance("event:/Music/Level 01"); EventInstance.start();
Updating the value:
EventInstance.setParameterByName("PlayerLocation", 6.5f); EventInstance.getParameterByName("PlayerLocation", out after);
The event is found and started without issue and the music plays. The value of
6.5 as expected. However, the sound doesn’t change.
If we set the parameter value and then call
EventInstance.start(); again, the expected new sound is played, but layered on top of the original sound as if two instances of the music are playing at the same time.
Any help would be very much appreciated, thanks in advance!