- Home /
How to show score after enemy death.,How to show score after the death of the enemy.
Hi i working on 2d shooting game and i need help with this little thing. So I need show score that the player gets, in text after enemy death.
This text should be displayed at the place of the enemy's death. ,Hi i need to show score in my 2d shooter game. It should spawn at the enemy's death point and after 2 seconds dissapear.
Answer by ComputerCables · Sep 14, 2019 at 11:17 PM
I would use Camera.WorldToScreenPoint to find where on the screen the enemy is displayed, then copy a prefab and place it on the canvas at that position.
https://docs.unity3d.com/ScriptReference/Camera.WorldToScreenPoint.html
Your answer
Follow this Question
Related Questions
Carry over texts from one scene to another? 1 Answer
UI Text won't appear at all. 1 Answer
How to detect button presses and change child object text in the button's Parent Object script 0 Answers
Central score counter for 3 score generating buttons 1 Answer
Can't drag text object into inspector? 0 Answers