Unfortunately, I’ve been unable to reproduce the issue you’re describing. If I create an event with an AHDSR modulation applied to the master track volume, with a release time of 1 second, and use the following C# script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RestartInstance : MonoBehaviour
{
FMOD.Studio.EventInstance instance;
FMOD.Studio.EventDescription desc;
string eventPath = "event:/Music/Level 02";
// Start is called before the first frame update
void Start()
{
// get event desc
desc = FMODUnity.RuntimeManager.GetEventDescription(eventPath);
// create instance
desc.createInstance(out instance);
// play music
instance.start();
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Return))
{
instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
// release instance
instance.release();
instance.clearHandle();
// create instance again
desc.createInstance(out instance);
// play music again
instance.start();
}
}
}
The old event instance stops and fades out over 1 second when I input return, while the new instance starts without issue.
Please give the script a try and let me know whether you still run into the issue.