using UnityEngine; using UnityEngine.Playables; public class PlaySEPlayableBehaviour : PlayableBehaviour { private string playSEFilename; public string PlaySEFilename { set{ playSEFilename = value; } } public override void OnGraphStart(Playable playable){ } public override void OnGraphStop(Playable playable){ } public override void OnBehaviourPlay(Playable playable, FrameData info){ #if UNITY_EDITOR if(SoundManager.ExistsInstance){ SoundManager.Instance.PlaySE(string.Format("Sounds/SE/{0}", playSEFilename)); } #else SoundManager.Instance.PlaySE(string.Format("Sounds/SE/{0}", playSEFilename)); #endif } public override void OnBehaviourPause(Playable playable, FrameData info){ } public override void PrepareFrame(Playable playable, FrameData info){ } }