- Home /
Question by
Thijsvt · Apr 04, 2017 at 05:00 AM ·
gameobjecttext
Update Text on Gameobject initiated from script from other Gameobject
Dear Unity,
I am developing for the HoloLens and I Made an object that follows me around. This Gameobject is actually an UI Canvas with text in it which I set like this (Just like in the MS example):
/// <summary>
/// The object to tag along set in the unity editor
/// </summary>
public GameObject ObjectToTagAlong;
/// <summary>
/// The instantiated object to tag along that follows you around.
/// </summary>
private GameObject instantiatedObjectToTagAlong;
this.instantiatedObjectToTagAlong = GameObject.Instantiate(this.ObjectToTagAlong);
this instantiatedObject tags along just fine but now I want to update the Text on instantiatedObjectToTagAlong but have no idea how to do this. (I can very easily update the text on the 1st object but i want to do it this way)
How can I update the text from script real-time on an object that I made from another object?
Thank you already,
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612114551im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Quest Script Help 2 Answers
Generating Random Numbers on a Game Object 1 Answer
Detect if a GameObject is partially behind another? 1 Answer
Putting text on a 3D object? 3 Answers