My game has this system where the player is rewarded with hearts.
Whenever a heart appears, it's supposed to appear with a value on it (say, 5). I did some googling and everything said I need to attach a canvas to the sprite and then a text component to the canvas. However, this doesn't seem to do anything.
CodePudding user response:
You just need the following structure
Sample Image settings: (Here you'll want to replace the "Source Image" with your heart sprite)
Sample Text settings: (Although I recommend using the TextMeshPro component instead)
Result: