Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Get Value/String From GUIText

$
0
0
This is a really simple question but I cannot find an answer. I want to get a int value from a GUIText object and add a number onto it. There are three scripts all modifying a value so I want to get the current set value of the GUIText and then set the value to a variable. Here is some code... var GUITextVar : GUIText; var intvar : int = 0; var currentval : int; var equal : int; function Update(){ intvar+=1; //Some Code to get the current value of the GUIText equal=currentval+intvar; GUITextVar.text=equal; } The Code isn't perfect as I just made it up. It would work otherwise. Thanks [EDIT]The values being edited from the other scripts are not static [/EDIT]

Viewing all articles
Browse latest Browse all 215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>