0
凝視對象時我有這個命中信息。當注視時,物體出現,但當視線離開時消失。我希望該對象在查看10秒後顯示。我在正確的道路上嗎?顯示凝視統一對象
float timeLeft = 10.0f;
timeLeft -= Time.deltaTime;
if (Hit == InfoCube)
{
GameObject.Find("GUIv2").transform.localScale = new Vector3(0.02f, 0.2f, 0.8f) // Shows object
}
else if (timeLeft < 0)
{
GameObject.Find("GUIv2").transform.localScale = new Vector3(0, 0, 0);
GameObject.Find("GUIv2").SetActive(false);
}
真棒的感謝! – Wzrd