private void OnEnable() { // Init the foldoutgroups if (settings.foldoutGroups.Count == 0) { for (int i = 0; i < settings.container.Count; i++) { settings.foldoutGroups.Add(false); } } // Init the tabstatus if (settings.tabStatus == null || settings.tabStatus.Count != settings.container.Count) { settings.tabStatus = new List <WarningStatus>(); for (int i = 0; i < settings.container.Count; i++) { settings.tabStatus.Add(WarningStatus.None); } } // Get the gui style GUIStyleManager.style.RefreshStyle(); style = GUIStyleManager.style; settingsMenu = new Rect(new Vector2(10, 10), windowSize); }
private void OnEnable() { GUIStyleManager.style.RefreshStyle(); // Copy the global reference style = GUIStyleManager.style; for (int iRect = 0; iRect < tabErrors.Length; iRect++) { tabErrors[iRect] = new Rect(80 + iRect * 100, 0, 20, 20); } if (settings.tabStatus == null || settings.tabStatus.Length != tabList.Length) { settings.tabStatus = new WarningStatus[tabList.Length]; } settingsMenu = new Rect(new Vector2(10, 10), windowSize); }