12345678910111213141516171819202122232425262728293031 |
- using UnityEngine;
- using UnityEngine.UI;
- namespace Blue
- {
- public class GetObjectSystem : SingletonMonobehaviour<GetObjectSystem>
- {
- [SerializeField] private GameObject ShowDevice;
- [SerializeField] private Transform Xunjian;
- private void Start()
- {
- GetObj();
- PushIOC();
- }
- private void GetObj()
- {
- Xunjian = new GameObject("Dof").AddComponent<Image>().transform;
- Xunjian.gameObject.SetActive(false);
- Xunjian.SetParent(OpenXRCamera.Instance.head.GetChild(0));
- Xunjian.GetComponent<RectTransform>().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);
- }
- }
- }
|