mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-06-20 11:23:42 +00:00
feat #671
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace YooAsset.Editor
|
||||
{
|
||||
public class CreateEmptyCatalogWindow : EditorWindow
|
||||
{
|
||||
static CreateEmptyCatalogWindow _thisInstance;
|
||||
|
||||
[MenuItem("Tools/空清单生成工具(Catalog)", false, 102)]
|
||||
static void ShowWindow()
|
||||
{
|
||||
if (_thisInstance == null)
|
||||
{
|
||||
_thisInstance = EditorWindow.GetWindow(typeof(CreateEmptyCatalogWindow), false, "空清单生成工具", true) as CreateEmptyCatalogWindow;
|
||||
_thisInstance.minSize = new Vector2(800, 600);
|
||||
}
|
||||
_thisInstance.Show();
|
||||
}
|
||||
|
||||
private string _packageName = string.Empty;
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.Space(10);
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_packageName = EditorGUILayout.TextField("Package Name", _packageName);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (string.IsNullOrEmpty(_packageName) == false)
|
||||
{
|
||||
if (GUILayout.Button("生成空的Catalog文件", GUILayout.MaxWidth(150)))
|
||||
{
|
||||
string outputPath = EditorTools.OpenFolderPanel("输出目录", "Assets/");
|
||||
if (string.IsNullOrEmpty(outputPath) == false)
|
||||
{
|
||||
CreateEmptyCatalogFile(outputPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateEmptyCatalogFile(string outputPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = CatalogTools.CreateEmptyCatalogFile(_packageName, string.Empty, outputPath);
|
||||
if (result == false)
|
||||
{
|
||||
Debug.LogError($"Create package {_packageName} catalog file failed ! See the detail error in console !");
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Debug.LogError($"Create package {_packageName} catalog file failed ! {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 211aadfc630b2ec419d5efce05e8aabe
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,7 +10,7 @@ namespace YooAsset.Editor
|
||||
{
|
||||
static PackageComparatorWindow _thisInstance;
|
||||
|
||||
[MenuItem("Tools/补丁包比对工具", false, 102)]
|
||||
[MenuItem("Tools/补丁包比对工具", false, 103)]
|
||||
static void ShowWindow()
|
||||
{
|
||||
if (_thisInstance == null)
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace YooAsset.Editor
|
||||
{
|
||||
static PackageImporterWindow _thisInstance;
|
||||
|
||||
[MenuItem("Tools/补丁包导入工具", false, 101)]
|
||||
[MenuItem("Tools/补丁包导入工具", false, 104)]
|
||||
static void ShowWindow()
|
||||
{
|
||||
if (_thisInstance == null)
|
||||
|
||||
Reference in New Issue
Block a user