Вот приблизительно то что я пытался сделать
Синтаксис:
Используется csharp
using UnityEngine;
using System.Collections;
public class Clock : MonoBehaviour
{
public Rect clock;
public GameObject target;
public float oclock;
void Start ()
{
GameTime gt = (GameTime)target.GetComponent("GameTime");
oclock = gt.timeInHours;
}
void Update ()
{
}
void OnGUI()
{
GUI.Box(clock,(string)oclock);
}
}
using System.Collections;
public class Clock : MonoBehaviour
{
public Rect clock;
public GameObject target;
public float oclock;
void Start ()
{
GameTime gt = (GameTime)target.GetComponent("GameTime");
oclock = gt.timeInHours;
}
void Update ()
{
}
void OnGUI()
{
GUI.Box(clock,(string)oclock);
}
}
Всем заранее спасибо