using UnityEngine; using UnityEngine.UI; namespace Blue { public class GetObjectSystem : SingletonMonobehaviour { [SerializeField] private GameObject ShowDevice; [SerializeField] private Transform Xunjian; private void Start() { GetObj(); PushIOC(); } private void GetObj() { Xunjian = new GameObject("Dof").AddComponent().transform; Xunjian.gameObject.SetActive(false); Xunjian.SetParent(OpenXRCamera.Instance.head.GetChild(0)); Xunjian.GetComponent().localPosition = new Vector3(InstantiateSystem.Instance.BlueObject.ZeroDofPosX, InstantiateSystem.Instance.BlueObject.ZeroDofPosY, InstantiateSystem.Instance.BlueObject.ZeroDofPosZ); } private void PushIOC() { SceneIOCContainer.Instance.Push("ShowDevice", ShowDevice); SceneIOCContainer.Instance.Push("Dof", Xunjian); } } }