- Home /
Question by
convictcartel · Dec 25, 2013 at 08:41 PM ·
guiprefabtxttext file
Changing GUITEXT Value...
I have a script where im trying to change the value of a guitext's prefab when its spawned.. but I cant seem to find the right code to access it.. its name is "DamageText"
void SpawnPts() {
GUIText ptsPrefabInstance;
ptsPrefabInstance = Instantiate(ptsPrefab, ptsPrefab.position, ptsPrefab.rotation) as GUIText;
GameObject.Find("DamageText").guiText.text=damage.ToString();
}
Comment