public static void Update() { CurrentPage = CountPage = 0; SettingPages.Clear(); Page[] pages = new Page[] { (Page_VRSetting)CreateInstance(typeof(Page_VRSetting)), (Page_LayerSetting)CreateInstance(typeof(Page_LayerSetting)), //(Page_QualitySetting)CreateInstance(typeof(Page_QualitySetting)), (Page_Finish)CreateInstance(typeof(Page_Finish)), }; foreach (var page_iter in pages) { if (page_iter.IsNeedShow()) { SettingPages.Add(page_iter); } } CountPage = SettingPages.Count; if (CountPage > 1) { window = GetWindow <ViveSR_Settings>(true); window.minSize = new Vector2(300, 400); } EditorApplication.update -= Update; }
private void Awake() { #if UNITY_EDITOR if (Application.isEditor) { ViveSR_Settings.Update(); } #endif }
private void Awake() { #if UNITY_EDITOR //error in opening project if (Application.isEditor) { ViveSR_Settings.Update(); } #endif }