123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using XRTool.Util;
- public class UserSceneUI : UserBaseUI<UserSceneUI>
- {
- public GameObject obj;
- public override void show()
- {
- base.show();
- Debug.Log("UI Show===>" + UserSceneManager.Instance.GetScenes().Count);
- if(!obj)
- LoadResources();
- }
- public void LoadResources()
- {
- //加载预制体
- Debug.Log("UI LoadResources===>");
- // GameScene.Instance.gotoScenes("147");
- UnityEngine.Object @object = ResMgr.Instance.Load("SceneChoose2");
- GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(@object as GameObject);
- obj = gameObject;//GameObject.Instantiate(Resources.Load<GameObject>("SceneChoose2"));
- obj.transform.parent = GameScene.Instance.Canvas.transform;
- obj.transform.localPosition = Vector3.zero;
- obj.transform.localEulerAngles = Vector3.zero;
- obj.transform.localScale = Vector3.one;
- }
- private void OnDestroy()
- {
- }
- }
|