Heres my script that has GUI:
static var PlayerMoney = 10;
function Start() {
}
function OnGUI ()
{
GUI.Button(Rect(50,40,60,60), "10");
}
Heres my Collect sciprt
#pragma strict
function Start () {
}
function OnTriggerEnter (Col : Collider)
{
PlayersMoney.PlayerMoney += 10;
Destroy(Col.gameObject);
}
How do i make the gui.button + the collect sciprt?
I mean not debug.log but gui.button.