InitRtc.cs 522 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class InitRtc : MonoBehaviour
  5. {
  6. // Start is called before the first frame update
  7. void Start()
  8. {
  9. Invoke("SetParent",1f);
  10. }
  11. public void SetParent()
  12. {
  13. this.transform.parent = OpenXRCamera.Instance.head;
  14. this.transform.localPosition = Vector3.zero;
  15. this.transform.localEulerAngles = Vector3.zero;
  16. }
  17. // Update is called once per frame
  18. void Update()
  19. {
  20. }
  21. }