// [SerializeField] private bool isRecoding = false; private void OnEnable() { SimpleAudio.Play3D(audioClip, audioPosition, audioPosition.ToString()); // SimpleAudio.Play(audioClip); // SimpleAnimationRecorder.StartRecording(this, animationClip); SimpleAnimationRecorder.PlayOnce(this, animationClip); }
public IEnumerator Play3DTest() { const string tag = "test2"; SimpleAudio.Play3D(_audioClip, Vector3.one, tag); yield return(null); var soundName = "[UniTool] SimpleAudio (test2)"; var audio = GameObject.Find(soundName).GetComponent <AudioSource>(); Assert.AreEqual(Vector3.one, audio.transform.position); Assert.AreEqual(true, audio.isPlaying); while (GameObject.Find(soundName) != null) { yield return(new WaitForSeconds(0.1F)); } Assert.AreEqual(null, GameObject.Find(soundName)); }