using System.Collections; using System.Collections.Generic; using UnityEngine; public class ShowTipTime : MonoBehaviour { public static ShowTipTime Instance; public float TimeFloat = 10; // Start is called before the first frame update void Awake() { Instance = this; } private void OnEnable() { t = 0; } private void OnDisable() { t = 0; TimeFloat = 10; } public float t; // Update is called once per frame void Update() { t = t + Time.deltaTime; if(t>TimeFloat) { this.gameObject.SetActive(false); } this.transform.position = OpenXRCamera.Instance.head.position; this.transform.eulerAngles = OpenXRCamera.Instance.head.eulerAngles; } }