Skip to content

Instantly share code, notes, and snippets.

@silenciocorner
Created April 8, 2021 13:11
Show Gist options
  • Save silenciocorner/dc846e6df586e9ec0c3ace8dd90ec04b to your computer and use it in GitHub Desktop.
Save silenciocorner/dc846e6df586e9ec0c3ace8dd90ec04b to your computer and use it in GitHub Desktop.
BeatmapDatatypes from MusicManager.cs script from Colin Vandervort article "FMOD Unity: Beat-Mapping"
public class MusicManager : MonoBehaviour
{
public static MusicManager me;
[SerializeField]
[EventRef]
private string music;
[StructLayout(LayoutKind.Sequential)]
public class TimelineInfo
{
public int currentBeat = 0;
public int currentBar = 0;
public float currentTempo = 0;
public int currentPosition = 0;
public float songLength = 0;
public FMOD.StringWrapper lastMarker = new FMOD.StringWrapper();
}
public TimelineInfo timelineInfo = null;
private void Awake()
{
me = this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment