I want “Score:” and then the score to increase with each collision/pickup of the object.
More specifically, I want "Score: " to become “Score: 1” after picking up a crystal shard, “Score: 2” after picking another, and etc every time the character picks up a crystal shard.
I’m quite new to scripting, and Javascript would be preferred, however C# is fine too.
You could create a canvas with a Text element inside.
In your script, make sure you are:
using UnityEditor.UI;
And then you can define
public Text yourTextObject;
Drag and drop your text element into the section in the inspector.
In your code, if you have an int variable called score
private void Update()
{
yourTextObject.text = "Score: " + score;
}
To update the on screen score every frame.
Hope this helped!