Score text disappears

Score text disappears when I start the game.

You’re not giving us anything to work with.

My initial thought is that when the game starts, you have code that updates the score text and - because there is no score yet - it gets set to an empty string. Usually when this happens it gets set to a 0, but without any context of your game/code, I can’t tell


I have added score text in my canvas

but as I start the game, is disappears
but the final score is shown in the game over scene

Hi Ansh,

Does your code assign a string value to text? Maybe an empty string?

If the text disappears in your game window, pause the game, and check the Inspector of the concerning game object. If there is nothing in the text field, you found the reason why there is no text in the game window.

If you cannot find any problem, please rewatch the video at least one more time, and compare your settings to Gary’s. Maybe a little detail is missing in your game.


See also:

image
score text disappeared from the canvas

Game objects do not magically disappear. There must be code that destroys this game object. Please try to find it.

1 Like

Privacy & Terms