NGUI 播放生音

1)NGUI中有一个UIPlay Sound脚本

2)创建一个Image->AddComponent->UIPlaySound脚本

3)拖入音频文件到Audio Clip里面,然后再Trigger里面选择Custom,

4)添加代码,

UIPlaySound  s = GameObject.Find("Image").GetComponentInChildren<UIPlaySound>();

s.play();

猜你喜欢

转载自blog.csdn.net/qq_30585525/article/details/53535136