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"); obj = 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() { } }