mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-23 07:38:33 -05:00
b4656bf24a
added the missing watch texture and corrected the watch orientation
18 lines
463 B
C#
18 lines
463 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class DigitalWatch : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI timeText;
|
|
|
|
void Start()
|
|
{
|
|
InvokeRepeating("UpdateTime", 0f, 1f); // Update time every second
|
|
}
|
|
|
|
void UpdateTime()
|
|
{
|
|
string currentTime = System.DateTime.Now.ToString("hh:mm tt"); // Get current time in the desired format
|
|
timeText.text = currentTime; // Update the TextMeshPro component with the current time
|
|
}
|
|
} |