I’m trying to convert an int value into a string to use it in a textmesh but while the code runs and doesnt come up with any errors the text isn’t changed. here is the code.
GameObject to = Instantiate (Resources.Load("textObj"),gameObject.transform.position,Quaternion.identity) as GameObject;
to.GetComponent<TextMesh> ().text = baseDam.ToString();
the text mesh still reads “hello world” rather than the baseDam value whats going wrong?