Other
My Text (Script) Disables at play time. How do I enable that again during run time?
So I created a Canvas and then add UI > Text. Anyhow. There is an option that says Text(Script) with a check mark next to it. At run time that box unchecks when I did touch controls and the text disappears. The real question is, is there a way to re-enable that checkmark on the Text (Script) with a line of code? The only one I can find is that can enable the entire UI > Text is:
textName.gameObject.SetActive(true);
Anyone know how I can re-enable that check mark on the Text (Script)? Any help would be appreciated.
Answer by xxmariofer · Feb 01, 2019 at 08:34 AM
hello, you just need to acces the component and change the enabled property, use the
textName.GetComponent<>().enabled = true
inside the put the name of the script you want to enable.
Follow this Question
Related Questions
UI Canvas Anchor points are stuck in the bottom left corner and disabled when in overlay mode. 1 Answer
Instantiated text not positioning properly 2 Answers
Make Text Appear When Looking at Object in VR 1 Answer
Load font by script 2 Answers
Updated with UI text element not correct (same frame) 0 Answers