Skip to content

Instantly share code, notes, and snippets.

@silenciocorner
Created April 8, 2021 13:26
Show Gist options
  • Save silenciocorner/dd8637416cc58c7565ce7ab9e5352107 to your computer and use it in GitHub Desktop.
Save silenciocorner/dd8637416cc58c7565ce7ab9e5352107 to your computer and use it in GitHub Desktop.
BeatmapDescriptionCallbacks from MusicManager.cs script from Colin Vandervort article "FMOD Unity: Beat-Mapping"
public class MusicManager : MonoBehaviour
{
...
private void Start()
{
...
musicPlayEvent.getDescription(out descriptionCallback);
descriptionCallback.getLength(out int length);
timelineInfo.songLength = length;
}
private void Update()
{
mainMusicPlayEvent.getTimelinePosition(out timelineInfo.currentPosition);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment