How can I increase the value of a number in my text with C#, like score, constantly increasing. In my Update. Here:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Score : MonoBehaviour {
public PlayerController player;
public Text gameText;
public float score = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
gameText.text = "Time : " + player.score;
score += 2;
}
}