public class ShipPropulsion : MonoBehaviour
{
bool onGround = false;
int mph = 90;
void Update()
{
GameObject speedometer = GameObject.Find ("Speedometer");
string readSpeed = speedometer.GetComponent<TextMesh>().text;
readSpeed = mph.ToString();
}
}
I have attempted this a few different ways, and I’m not getting any errors, but I’m also not getting anything else. The value just stays displayed as “50” as I’ve set it in the inspector. I’ve tried substituting the int with a string, and still get no change in the display at runtime.
I’m sure it’s something simple.