private void OnGUI() { EditorGUILayout.Space(); activeWindowTab = GUILayout.Toolbar(activeWindowTab, tabs.Select(info => info.Name).ToArray()); EditorGUILayout.Space(); if (activeWindowTab != previousWindowTab) { DeviceLinker.InitDeviceLists(Tab.Type); previousWindowTab = activeWindowTab; } DrawUiElements(); }
private void OnEnable() { titleContent = new GUIContent("Device Linker"); var windowSize = minSize; windowSize.x = 250; minSize = windowSize; PopulateTabs(); EditorSceneManager.sceneOpened += (oldScene, newScene) => { PopulateTabs(); DeviceLinker.InitDeviceLists(Tab.Type, forceRefresh: true); }; }