Вот код (на C#), который я использую:
Код: Выделить всё
using UnityEngine;
using System.Collections;
public class ConnectGUI : MonoBehaviour {
private string map = "No map selected.";
// Use this for initialization
void Start () {
}
void OnGUI () {
GUI.Label(new Rect(10,10,200,90), "Map selected: ", map);
if(GUI.Button (new Rect(10,50,90,20), "Pier")){
map = "Pier";
}
}
// Update is called once per frame
void Update () {
}
}
Подробнее здесь: https://stackoverflow.com/questions/310 ... i-in-unity