using UnityEditor;
//1.继承EditorWindow 类
public class AssetBundleWindows : EditorWindow {
//2.实现OnGUI方法 绘制窗口
private void OnGUI()
{
}
}
//3.这个类要放在Editor文件夹下
public class MenuEditor {
//4.方法为静态方法
[MenuItem("xxl/打包资源窗口")] //5.显示在菜单栏
public static void ShowAssetBundleWndows()
{
//6.创建窗口实体
AssetBundleWindows win = (AssetBundleWindows)EditorWindow.GetWindow(typeof(AssetBundleWindows));
win.titleContent = new GUIContent("资源包管理");
//7.显示窗口实体
win.Show();
}
}