public static void AddWindow(string strPackFolderAbsPath) { SelectOverWriterPNGWnd window = (SelectOverWriterPNGWnd)EditorWindow.GetWindow <SelectOverWriterPNGWnd>("覆盖图集"); window.Init(strPackFolderAbsPath); window.Show(); }
static void SpritePackToOverWriter() { Object[] os = Selection.GetFiltered(typeof(Object), SelectionMode.Assets); if (os.Length != 1) { return; } string filePath = AssetDatabase.GetAssetPath(os[0].GetInstanceID()); SelectOverWriterPNGWnd.AddWindow(filePath); }