I’m working on a client’s game and I’m having trouble triggering a parameter change.
The game has a prefab called DarkMatter which triggers my local Perk parameter to update when the prefab is created. The emitter using this parameter is on the PegBasic prefab which triggers on Collision Enter 2D.
The parameter doesn’t seem to update, though manually changing the parameter on a PegBasic object does work and the sound plays as expected.
The sounds are managed in a dedicated Perk Manager event with a parameter sheet.
Hi,
Thanks for the detailed screenshots!
From what I can see, the issue might caused by timing: your Studio Parameter Triggers
fire on Object Start/Disable, but the Studio Event Emitter
on PegBasic
only creates the event instance on Collision Enter 2D. When the triggers run, there’s no instance yet, so the local Perk
parameter isn’t applied. Later, when the collision occurs and the instance is finally created, it uses the event’s default parameter value, which makes it seem like the parameter change didn’t work.
For reference, a similar discussion can be found here: Changing Paremeters in Unity From Code - #2 by Leah_FMOD