I create a GUI.textfield and GUI.label
and Button
when i press button the text that i input in the textfield transfer to my label
thank you
see my code below i hope anyone can help me
#pragma strict
var mytext:String;
private var copy : String;
function Start () {
}
function Update () {
PlayerPrefs.SetString("copy","mytext");
}
function OnGUI()
{
mytext=GUI.TextField(Rect(Screen.width/2+100,Screen.height/2+100,100,50),mytext,25);
GUI.Label(Rect(Screen.width/2+100,Screen.height/2+50,100,50),copy);
if(GUI.Button(Rect(Screen.width/2+100,Screen.height/2,100,50),"Copy Text"))
{
copy = PlayerPrefs.GetString("mytext");
}
}