1234567891011121314151617181920212223242526272829303132 |
- using Blue;
- using UnityEngine;
- using UnityEngine.UI;
- namespace GHZLangChao
- {
- public class GetObjectSystem : SingletonMonobehaviour<GetObjectSystem>
- {
- [SerializeField] private GameObject ShowDevice;
- [SerializeField] private Transform Xunjian2;
- private void Awake()
- {
- GetObj();
- PushIOC();
- }
- private void GetObj()
- {
- Xunjian2 = new GameObject("Dof").AddComponent<Image>().transform;
- Xunjian2.gameObject.SetActive(false);
- Xunjian2.SetParent(OpenXRCamera.Instance.head.GetChild(0));
- Xunjian2.GetComponent<RectTransform>().localPosition = new Vector3(50, 0, 180);
- }
- private void PushIOC()
- {
- SceneIOCContainer.Instance.Push("ShowDevice", ShowDevice);
- SceneIOCContainer.Instance.Push("Dof", Xunjian2);
- }
- }
- }
|