I have a GuiText prefab.
It dosent work after instantiated and update text in the Update() function.
Is there anyone,have faced same problem?
GameObject Subtitle;
string Subtitle_text;
void Start ()
{
Subtitle = (GameObject)Resources.Load(“Subtitle”);
Color alpha = Subtitle.guiTexture.color;
alpha.a = 0.1f;
Subtitle.guiTexture.color = alpha;
Instantiate(Subtitle);
}
void SetSubTitle(string text)
{
Subtitle_text = text;
}
void Update ()
{
Subtitle.guiText.text = Subtitle_text;
}
This is my part of code.Please