Skip to content

Instantly share code, notes, and snippets.

@webthingee
Created March 28, 2019 22:28
Show Gist options
  • Save webthingee/eadb3d850b59cd694ceaeacd4e6a6ef4 to your computer and use it in GitHub Desktop.
Save webthingee/eadb3d850b59cd694ceaeacd4e6a6ef4 to your computer and use it in GitHub Desktop.
FMOD
public class MusicHeath : MonoBehaviour
{
[EventRef] public string musicHealth;
private FMOD.Studio.EventInstance musicHealthEvent;
private FMOD.Studio.ParameterInstance healthParam;
public float healthIntensity;
void Start()
{
musicHealthEvent = RuntimeManager.CreateInstance((musicHealth));
musicHealthEvent.getParameter("Health", out healthParam);
musicHealthEvent.start();
}
void Update()
{
healthParam.setValue(healthIntensity);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment