You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
469 B
17 lines
469 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using System;
|
|
using UnityEngine.UI;
|
|
public class TimeNow : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame updat
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
DateTime datetime = DateTime.Now;
|
|
string str = string.Format("{0:D2}:{1:D2}:{2:D2}",datetime.Hour,datetime.Minute,datetime.Second);
|
|
GetComponent<Text>().text = str;
|
|
}
|
|
}
|