Could someone help me with this simple script?

Hello.
I want this script to show score (Time.time). But i want to activate it 10 second after scene starts. Im a beginner at programming. Thank you :slight_smile:

using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class scoretext : MonoBehaviour
{
    Text text;                      // Reference to the Text component.
    void Awake ()
    {
        // Set up the reference.
        text = GetComponent <Text> ();
    }
    void Update ()
        {
        text.text = "Score : " +(int) Time.time;
        }
}

Start off the GUI element as not active, make a new method that sets it active, than in your Start() method use the Invoke method to fire off your setactive method.

1 Like