Strange bug?

I have an on-screen keyboard composed of a bunch of buttons. One button - named buttonO has a capital O in its text field. I have another field in the same canvas named Text - and I do this when the scene starts:

GameObject.Find(“Text”).GetComponent().text = “Please enter your email address and your\nspell will be sent to your email.”;

For whatever reason this also places this text into ButtonO’s text field - so ButtonO says “Please” instead of “O”. I tried changing the font, etc. nothing worked.

Finally I changed the field’s name from Text to subTitle and now it works fine.

Anyone have any idea why Untiy got confused with the reference? Probably a bad idea to name text fields Text?

GameObject.Find(“Text”) is kind of not a good idea, it will give you the first gameobject named Text that it can find.
If you have multiple objects int the project with that name you will have a bad time.
Try to get the reference to that object / text object via another way.

Thanks! I guess because all the buttons have a Text object attached, that makes sense.