I have a problem with my guitext not changing nomatter what I do.(c#)
In one script I have
public int GemsGained= 0;
Thene evertime I click an item with the gem type is is added to the amount collected
public void OnMouseUp(){
if(gameObject.tag == "gem"){
//Debug.Log ("it's called");
}
item= true;
renderer.enabled = false;
GemsGained++;
All works so far, debugged it and it works fine. Thene in another scipt that I want to attach to a GUItext to update how many you have found, I added this.
void Update () {
{
guiText.text =GemsGained.ToString();
}
Also tries ""+GemsGained, and so on, but it's not updating, it's stuck at 0 nomatter what I do, even pulling up the number of gems you start with doesn't move it from 0.
Any idea's?