- Home /
Answer by satyagames · Aug 31, 2015 at 08:01 AM
No need to Convert InputField to String - Because already InputField in string format.
String to Int :- int.Parse(varibleOfString);
Int to String :- varibleOfInt.ToString();
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class TestCode : MonoBehaviour {
public InputField x;
string y;
void Update()
{
y = x.text;
Debug.Log (y);
}
}