I am trying to access a Text Child on the canvas, which I tagged “StartButton”. I would like to change the scale of it from a script, which is attached to the Canvas. In that script I attempted the following:
public Text _Text;
public GameObject _Canvas;
void Start()
{
_Canvas = GameObject.FindGameObjectWithTag("StartButton");
_Text = GameObject.Find("_Canvas").GetComponent<Text>();
_Text.text = "Test";
}
I’m still fairly new to Unity and I am working on porting a project from Gamemaker Studio. Above I was just attempting to change the text to test, but it is not finding the object. I believe I have to access the Rect Transform in order to change the scale.
I hope I explained it correctly. Any assistance would be greatly appreciated.
Thank You!