Change a text during run time

I have a simple game where a capsule jumps over oncoming barrels. Every barrel that you jump over adds one to score and prints it to the debug log. I want it on a text so the player can see it at all times. Thanks :slight_smile:

Look at the Unity documentation to learn how to use Canvases and UIs. Within your UI you’ll have a Text object that you can reference within your scripts. After that it’s as simple as…

int score = 0;
Text scoreText;

public void UpdateScore()
    // Debug.Log(score);
    scoreText.text = string.Format("Score: {0}", score);