public static void Open() { VintageAbout window = EditorWindow.GetWindow <VintageAbout>(true, @"About 'Vintage'", true); window.minSize = window.maxSize = new Vector2(700, 500); window.ShowUtility(); }
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { string version = @"1.0"; for (int i = 0; i < importedAssets.Length; ++i) { if (importedAssets[i].Contains(@"Vintage/Changelog.txt") == true && importedAssets[i].EndsWith(@".meta") == false) { string assetPath = VintageAbout.GetAssetPath(); if (string.IsNullOrEmpty(assetPath) == false) { TextAsset changeLogAsset = AssetDatabase.LoadAssetAtPath <TextAsset>(assetPath + @"Changelog.txt"); if (changeLogAsset != null && string.IsNullOrEmpty(changeLogAsset.text) == false) { version = changeLogAsset.text.Split(new char[] { '\n', '\r' })[0]; if (EditorPrefs.GetString(VintageAbout.assetID, @"0.0") != version) { VintageAbout.Open(); } break; } } } } }