Your Cart
Loading
unity digital clock how to make digital clock in unity tutorial unity real time clock

Unity Digital Clock | Unity Tutorial

Unity Digital Clock | Unity Tutorial


In this video tutorial, we'll guide you through the process of creating a digital clock using Unity. You'll learn how to set up a real time clock, design a user-friendly interface, and implement scripts to display the current time.



WATCH FULL TUTORIAL ON YOUTUBE


CHECK OUR PROJECTS


SUBSCRIBE FOR LATEST OFFERS



=========================================================


3 Unity Projects Only $50 - ON SALE!!!!

https://youtu.be/7mI-fJpXN88


Contact: unitycoderz2022@gmail.com


=========================================================



Script:


DigitalClock.cs


using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.UI;


public class DigitalClock : MonoBehaviour

{

  public Text clockText;

   

   

  // Start is called before the first frame update

  void Start()

  {

    StartCoroutine(UpdateClock());

  }


  IEnumerator UpdateClock()

  {

    while (true)

    {

      System.DateTime now = System.DateTime.Now;

      clockText.text = now.ToString("hh:mm:ss tt");

      yield return new WaitForSeconds(1);

    }

  }

}





DOWNLOAD CODESTER FILES