WindowConfig.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using XRTool.Util;
  5. [CreateAssetMenu(menuName = "WindowConfig")]
  6. public class WindowConfig : ScriptableObject
  7. {
  8. public windowType initShowWindow;
  9. public Canvas canvas;
  10. public List<UnityEngine.Object> initComponent;
  11. public List<windowItemGameObject.w1> windowItemGameObjectList;
  12. [Serializable]
  13. public abstract class windowItemGameObject
  14. {
  15. public GameObject window;
  16. public windowType type;
  17. public abstract List<windowItemGameObject> windowItemGameObjectList { get; set; }
  18. public windowType parentType;
  19. [System.Serializable]
  20. public class w1 : windowItemGameObject
  21. {
  22. public List<w2> _childs;
  23. public override List<windowItemGameObject> windowItemGameObjectList
  24. {
  25. get
  26. {
  27. return _childs.ConvertAll<windowItemGameObject>(x => x);
  28. }
  29. set
  30. {
  31. _childs = value.ConvertAll(x => x as w2);
  32. }
  33. }
  34. }
  35. [System.Serializable]
  36. public class w2 : windowItemGameObject
  37. {
  38. public List<w3> _childs;
  39. public override List<windowItemGameObject> windowItemGameObjectList
  40. {
  41. get
  42. {
  43. return _childs.ConvertAll<windowItemGameObject>(x => x);
  44. }
  45. set
  46. {
  47. _childs = value.ConvertAll(x => x as w3);
  48. }
  49. }
  50. }
  51. [System.Serializable]
  52. public class w3 : windowItemGameObject
  53. {
  54. public List<w4> _childs;
  55. public override List<windowItemGameObject> windowItemGameObjectList
  56. {
  57. get
  58. {
  59. return _childs.ConvertAll<windowItemGameObject>(x => x);
  60. }
  61. set
  62. {
  63. _childs = value.ConvertAll(x => x as w4);
  64. }
  65. }
  66. }
  67. [System.Serializable]
  68. public class w4 : windowItemGameObject
  69. {
  70. public List<w5> _childs;
  71. public override List<windowItemGameObject> windowItemGameObjectList
  72. {
  73. get
  74. {
  75. return _childs.ConvertAll<windowItemGameObject>(x => x);
  76. }
  77. set
  78. {
  79. _childs = value.ConvertAll(x => x as w5);
  80. }
  81. }
  82. }
  83. [System.Serializable]
  84. public class w5 : windowItemGameObject
  85. {
  86. public override List<windowItemGameObject> windowItemGameObjectList
  87. {
  88. get
  89. {
  90. return null;
  91. }
  92. set
  93. {
  94. }
  95. }
  96. }
  97. }
  98. public enum windowType
  99. {
  100. Login = 100001, // 登录
  101. Project = 100002, // 项目
  102. XunJian = 200001, // 巡检
  103. XunJianLB = 201001, // 巡检
  104. XunJianStart = 201002, // 巡检
  105. ProjectMain = 200002, // 主页
  106. RTC = 200003, // 远程协助
  107. RTCCall = 203010, // 远程协助等待呼叫页面
  108. RoomMain = 203011, // 远程协助房间
  109. YinDao = 200004, // 引导
  110. PeiXun = 200005, //
  111. Demo = 200006, // 临时demo演示
  112. DaoHang = 200007, // 设备导航
  113. Error = 900001, //
  114. Tip = 800001, //
  115. Tip2 = 800002, //
  116. Top = 700001, //
  117. }
  118. }