unity按钮
- 作者: 浪9了就喜欢海
- 来源: 51数据库
- 2020-10-03
C#
void OnGUI()
{
if(GUI.Button(new Rect(50,50,50,50),"Button"))
{
Debug.Log("wo shi yi ge an niu");
}
}
public audioclipe music;//把音乐拖上来
ongui(){
if(gui.button(0,0,100,100,"button"))
{
audio.play();
}
}
void OnGUI()
{
if(GUI.Button(new Rect(50,50,50,50),"Button"))
{
Debug.Log("wo shi yi ge an niu");
}
}
public audioclipe music;//把音乐拖上来
ongui(){
if(gui.button(0,0,100,100,"button"))
{
audio.play();
}
}
推荐阅读
