2021
04-27
04-27
unity AudioSource播放完声音后要执行的函数或条件操作
将脚本挂在要判断声音是否播放完毕的物体上usingSystem.Collections;usingUnityEngine;usingUnityEngine.Events;[RequireComponent(typeof(AudioSource))]publicclassAudioManager:MonoBehaviour{publicstaticAudioManagerinstence=null;privateAudioSource_audio;voidAwake(){if(instence==null){instence=this;}}voidStart(){_audio=GetComponent<AudioSource>();}voidUpdate(){//按下键盘按钮A键...
继续阅读 >