private void OnValidate() { if (!_isRegister) { CustomEventManager.RegisterListener <EventInfo.FmodEventInfo>(ChangePreset); } _isRegister = true; }
private void Awake() { CustomEventManager.RegisterListener <EventInfo.FmodEventInfo>(ChangePreset); musicInstance = FMODUnity.RuntimeManager.CreateInstance(musicEvent); ambienceInstance = FMODUnity.RuntimeManager.CreateInstance(ambienceEvent); // globalInstance = FMODUnity.RuntimeManager.CreateInstance(environment); //Change speed t = 0.0001f; }