- Home /
UI Text not displaying for some game objects when Player is within distance of the object
Hi All, I have a UI text that displays anytime the player gets within 1.5 distance of a game object the player can interact with. The text says "Press (F)" but it only enables when I get within the stated distance of the first of these objects I put in the game. The second object and a third test object, shows the text is active on the console, but the text is not displaying in game. I can still press F to pick up the object, but the text just isn't displaying. Below are screenshots and my game object code. Also, it doesn't matter which game object I walk over to first. The first of the game objects inserted into the game is still the only object that will display the text prompt to press F. All settings are the same that I can see and I've inserted all the correct objects and texts in the Inspector. Any idea what is wrong or what I am missing?
Update: I notice that if I disable the object while in game-play and then re-activate it during game-play, the UI text will display. So for this particular object, it is not detecting when the player is within the deter$$anonymous$$ed distance of the object or it is not being detecting as active.??? Or there is something else going on entirely that i haven't discovered yet.
Your answer
Follow this Question
Related Questions
Displaying varying text 1 Answer
Display text when near an object, then go away 0 Answers
How to display text using javascript ? 1 Answer
How can somebody make text actually appear on the screen with a script 2 Answers
enable disabled GameObjects 1 Answer