UserSceneUI.cs 889 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XRTool.Util;
  5. public class UserSceneUI : UserBaseUI<UserSceneUI>
  6. {
  7. public GameObject obj;
  8. public override void show()
  9. {
  10. base.show();
  11. Debug.Log("UI Show===>" + UserSceneManager.Instance.GetScenes().Count);
  12. if(!obj)
  13. LoadResources();
  14. }
  15. public void LoadResources()
  16. {
  17. //加载预制体
  18. Debug.Log("UI LoadResources===>");
  19. // GameScene.Instance.gotoScenes("147");
  20. obj = GameObject.Instantiate(Resources.Load<GameObject>("SceneChoose2"));
  21. obj.transform.parent = GameScene.Instance.Canvas.transform;
  22. obj.transform.localPosition = Vector3.zero;
  23. obj.transform.localEulerAngles = Vector3.zero;
  24. obj.transform.localScale = Vector3.one;
  25. }
  26. private void OnDestroy()
  27. {
  28. }
  29. }