Convert a GUIText's number to an Integer value.
Hello world, I'll try to explain something in a different language as mine. I have a UI Text with a number inside. I want to take this number and convert it to an int value. The UI Text has only the number and no other text. My Text public variable is called "text_up".
public Text text_up;
When the game is over, it takes the Text's number and does a calculation with it.
I've already tried this :
System.Convert.ToInt32(text_up); //This code line is in a function which is called when the game is over!
But I'm stuck here. I don't know how to use it afterwards.
Thanks Unity's Community. (sorry for my bad English)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612124339im_/https://answers.unity.com/themes/thub/images/avi.jpg)