Unity Cross-fade EventInstance with another event

Off the top of my head there are three ways you could do this:

  1. Have separate events in the tool, separate instances at runtime, start and stop them in code, cross-fade in code using EventInstance.setVolume()

  2. Have separate events in the tool with a fade-in fade-out (AHDSR) on the master volume, separate instances at runtime, start and stop them in code. Disadvantage is fade-in is always present even when you might not want a cross fade.

  3. Have the events as subevents of a master event triggered on a parameter. Start the master event once, change the parameter value in code. Put an AHDSR on the event instrument to handle cross fading. Advantage is there is only one event instance to keep track of.

2 Likes