Display the same string in multiple text boxes

I have a script which writes to a text element in my game. It works fine, but I want a different text element on a different part of the screen to display the SAME string.

As far as I can tell, applying the box to my script to write to in the inspector only attaches the one, even if you copy or duplicate them.

I’ve tried making them prefabs but they change back to standard gameobjects on play. Not sure why.


You can make an array of text elements in your script and make a for loop function to iterate all those array elements to write the text to those elements. Then attach all those text boxes to the same array in the Inspector.