This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BeatSpawner : MonoBehaviour | |
{ | |
private bool beatSpawnArmed = false; | |
[SerializeField] | |
private Track[] tracks; | |
private string lastMarkerName; | |
private void Start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
... | |
void OnDestroy() | |
{ | |
musicPlayEvent.setUserData(IntPtr.Zero); | |
musicPlayEvent.stop(FMOD.Studio.STOP_MODE.IMMEDIATE); | |
musicPlayEvent.release(); | |
timelineHandle.Free(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
... | |
[AOT.MonoPInvokeCallback(typeof(FMOD.Studio.EVENT_CALLBACK))] | |
static FMOD.RESULT BeatEventCallback(FMOD.Studio.EVENT_CALLBACK_TYPE type, FMOD.Studio.EventInstance instance, IntPtr parameterPtr) | |
{ | |
IntPtr timelineInfoPtr; | |
FMOD.RESULT result = instance.getUserData(out timelineInfoPtr); | |
if (result != FMOD.RESULT.OK) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
... | |
private void Start() | |
{ | |
... | |
musicPlayEvent.getDescription(out descriptionCallback); | |
descriptionCallback.getLength(out int length); | |
timelineInfo.songLength = length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
... | |
private void Awake() | |
{ | |
... | |
} | |
private void Start() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
... | |
public TimelineInfo timelineInfo = null; | |
private GCHandle timelineHandle; | |
private FMOD.Studio.EVENT_CALLBACK beatCallback; | |
private FMOD.Studio.EventDescription descriptionCallback; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MusicManager : MonoBehaviour | |
{ | |
public static MusicManager me; | |
[SerializeField] | |
[EventRef] | |
private string music; | |
[StructLayout(LayoutKind.Sequential)] | |
public class TimelineInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Runtime.InteropServices; | |
using FMODUnity; | |
public class MusicManager : MonoBehaviour | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Music : MonoBehaviour | |
{ | |
private FMOD.Studio.EventInstance instance; | |
private BeatSystem bS; | |
void Start() | |
{ | |
bS = GetComponent<BeatSystem>(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using UnityEngine; | |
class BeatSystem : MonoBehaviour | |
{ | |
[StructLayout(LayoutKind.Sequential)] | |
class TimelineInfo | |
{ | |
public int currentMusicBeat = 0; |
NewerOlder