- Home /
Changing the text of a GUIText
This is my first time asking a question here, but the problem I have is the following:
I have a prefab which contains a GUIText. This prefab gets initialized multiple times right after one another. The thing is that I'm changing the GUIText of the prefab, but when changing lets say the GUIText from prefab 1, I can see the GUIText from prefab2 change as well. I want the text of prefab 2, to stay the same after changing the text of prefab 1.
Can anyone help me with this?
Answer by Wolfram · Jan 11, 2013 at 03:44 PM
It is intentional that changing the prefab's text influences all instances that don't have a locally modified text.
Don't change the text of your original prefab, change the text of the objects you have instanced using the prefab.
lol, if this is really what he was doing then it was kind of weird expressed
Answer by marius.treu · Jan 11, 2013 at 02:58 PM
I think your problem is that you have referenced all the prefabs when instanciating. If you use the same function over each prefab your problem occures.
Actually if you create GameObjects each with guitext attached they are independent from each.
It must has to do with your scripting ;)
Some code would help..
Your answer
![](https://koobas.hobune.stream/wayback/20220613090757im_/https://answers.unity.com/themes/thub/images/avi.jpg)