Created
April 8, 2021 13:29
-
-
Save silenciocorner/3dcdc832caf318db30a9b7c2abb0eb7f to your computer and use it in GitHub Desktop.
OnDestroy of MusicManager.cs script from Colin Vandervort article "FMOD Unity: Beat-Mapping"
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(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment