これは、CriAtomSource コンポーネントをアタッチせずに CriAtomExPlayer
を使う方法。
CriAtomExPlayer
で SetAisacControl
を制御する場合、this.criAtomExPlayer.Update(this.playback)
のように Update しないと設定が反映されない。
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class BgmController : MonoBehaviour | |
{ | |
//private CriAtomSource criAtomSource; | |
private CriAtomExPlayback playback; | |
private CriAtomExPlayer criAtomExPlayer; | |
void Start() | |
{ | |
this.criAtomExPlayer = new CriAtomExPlayer(true); | |
this.criAtomExPlayer.SetCue(CriAtom.GetCueSheet("CueSheet_0").acb, "Fatyjy(Cue Name)"); | |
this.playback = this.criAtomExPlayer.Start(); | |
} | |
void Update() | |
{ | |
Debug.Log(this.playback.GetTimeSyncedWithAudio()); | |
} | |
public void BassSliderOnValueChange(float newSliderValue) | |
{ | |
this.criAtomExPlayer.SetAisacControl("BassControl", newSliderValue); | |
this.criAtomExPlayer.Update(this.playback); | |
} | |
} |
これは、CriAtomSource コンポーネントをアタッチせずに CriAtomExPlayer
を使う方法。
CriAtomExPlayer
で SetAisacControl
を制御する場合、this.criAtomExPlayer.Update(this.playback)
のように Update しないと設定が反映されない。