- Home /
textmesh in prefab folder updating but prefabed textmesh in scene isn't updating in scene
Good Morning,
I have been having this issue with my player health text mesh for a couple of days and I cannot find a solution anywhere on the internet. The player health text mesh doesn't show in scene nor does it update when damage is done to the player. The values in the prefab change so for example the player character has 25 health in the inspector the player takes damage and now has 18 health. In the scene the health number text mesh doesn't show or display 18 health. When I exit play mode the text mesh updates to 18 but it doesn't update live in play mode.
This only shows up on my HUD prefab that I drag out of my prefab folder and into the scene because the health number text mesh inside of that prefab is linked to my Player prefab. BUT if I were to drag the health number text mesh that is currently in my scene and put it on my player in the scene it will function like normal but doing it this way effects another script of mine into not working correctly because of this issue. I update the textMesh via the ToString() method
So my question is: How can I make it so that values in my prefab are shown on my textMesh in the scene.
I hope this makes sense!
Your answer
Follow this Question
Related Questions
How do I change text in a Text Mesh Pro GUI attached to my prefab 0 Answers
How to generate prefab with random number inside it ? 1 Answer
Display Objects in the center of the screen and add commands 1 Answer
UGUI custom material for some parts of the text 0 Answers
UI components all disappear on Play mode, then stay invisible 2 Answers