private void OnGUI() { //Can't use SessionState in 5.4, so needs to check every frame StylizedWaterCore.CheckUnityVersion(); DrawHeader(); GUILayout.Space(5); DrawTabs(); GUILayout.Space(5); EditorGUILayout.BeginVertical(EditorStyles.helpBox); if (isTabInstallation) { DrawInstallation(); } if (isTabDocumentation) { DrawDocumentation(); } if (isTabSupport) { DrawSupport(); } //DrawActionButtons(); EditorGUILayout.EndVertical(); DrawFooter(); }
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { foreach (string str in importedAssets) { if (str.Contains("StylizedWaterCore.cs")) { StylizedWaterCore.CheckUnityVersion(); if (!compatibleVersion || untestedVersion) { SWS_Window.ShowWindow(); } } } }
public static void ShowWindow() { EditorWindow editorWindow = EditorWindow.GetWindow <SWS_Window>(true, "Help", true); editorWindow.titleContent = new GUIContent("Help"); editorWindow.autoRepaintOnSceneChange = true; //Open somewhat in the center of the screen editorWindow.position = new Rect((Screen.width) / 2f, (Screen.height) / 2f, (width * 2), height); //Fixed size editorWindow.maxSize = new Vector2(width, height); editorWindow.minSize = new Vector2(width, 200); //Init(); //StylizedWaterCore.VersionChecking.CheckForUpdate(); StylizedWaterCore.CheckUnityVersion(); editorWindow.Show(); }