- Home /
Question by
KaydenK · Apr 26, 2016 at 04:27 PM ·
scripting problemsound
How could i play a sound when i click a button if the button is using OnGUI?
ive been looking all over the internet and cant find a way pls help!!!! :)
Comment
Answer by Vagonn · Apr 26, 2016 at 05:14 PM
Read these two docs and combine. You are done :)
http://docs.unity3d.com/ScriptReference/GUI.Button.html
http://docs.unity3d.com/ScriptReference/AudioSource.Play.html