Accessing UI text
I have two scripts. One is the PlayerVerbs and the other is DoorToggle. In PlayerVerb I have a macro to open and close door by using a macro. In DoorToggle I assigned a UI text and a boolean. The boolean is to switch whether or not the door is open. If it is open, I send a message to the text that the player can closed the door and vice versa. In PlayerVerbs I access DoorToggle's boolean by using Door.GetComponent().DoorToggleSendMessage(); It works, but the problem is somewhere along the line, if I assigned the text in the DoorToggleSendMessage class, it somehow lose it reference point. Why is that? What can I do to fix this?
Your answer
Follow this Question
Related Questions
problem with Adjustable Character Spacing script in Unity 5.4 0 Answers
NullReferenceException on Text element 1 Answer
How do I keep two UI text unity3d on the scene 2 Answers
UI Text created from C# Script 0 Answers
Changing the UI Text 0 Answers