コード例 #1
0
 private void OnGUI()
 {
     GUILayout.BeginHorizontal();
     mMd5Path = EditorGUILayout.TextField("ABMD5路径: ", mMd5Path, GUILayout.Width(350), GUILayout.Height(20));
     if (GUILayout.Button("选择版本ABMD5文件", GUILayout.Width(150), GUILayout.Height(30)))
     {
         openFileName              = new OpenFileName();
         openFileName.structSize   = Marshal.SizeOf(openFileName);
         openFileName.filter       = "ABMD5文件(*.bytes)\0*.bytes";
         openFileName.file         = new string(new char[256]);
         openFileName.maxFile      = openFileName.file.Length;
         openFileName.fileTitle    = new string(new char[64]);
         openFileName.maxFileTitle = openFileName.fileTitle.Length;
         openFileName.initialDir   = (Application.dataPath + "/../Version").Replace("/", "\\");//默认路径
         openFileName.title        = "选择MD5窗口";
         openFileName.flags        = 0x00080000 | 0x00001000 | 0x00000800 | 0x00000008;
         if (LocalDialog.GetSaveFileName(openFileName))
         {
             Debug.Log(openFileName.file);
             mMd5Path = openFileName.file;
         }
     }
     GUILayout.EndHorizontal();
     GUILayout.BeginHorizontal();
     mHotCount = EditorGUILayout.TextField("热更补丁版本:", mHotCount, GUILayout.Width(350), GUILayout.Height(20));
     GUILayout.EndHorizontal();
     if (GUILayout.Button("开始打热更包", GUILayout.Width(100), GUILayout.Height(50)))
     {
         if (!string.IsNullOrEmpty(mMd5Path) && mMd5Path.EndsWith(".bytes"))
         {
             BundleEditor.Build(true, mMd5Path, mHotCount);
         }
     }
 }
コード例 #2
0
        public static void BuildIOS()
        {
            //打ab包
            BundleEditor.Build();
            BuildSetting buildSetting = GetIOSBuildSetting();
            string       suffix       = SetIOSSetting(buildSetting);

            //生成可执行程序
            string abPath = Application.dataPath + "/../AssetBundle/" + EditorUserBuildSettings.activeBuildTarget.ToString() + "/";

            //清空生成的文件夹
            Utility.FileHelper.DeleteDir(iOSPath);
            Utility.FileHelper.CopyFileTo(abPath, Application.streamingAssetsPath);


            string name     = sAppName + "_IOS" + suffix + string.Format("_{0:yyyy_MM_dd_HH_mm}", DateTime.Now);
            string savePath = iOSPath + name;

            BuildPipeline.BuildPlayer(FindEnableEditorScenes(), savePath, EditorUserBuildSettings.activeBuildTarget, BuildOptions.None);
            Utility.FileHelper.DeleteDir(Application.streamingAssetsPath);

            WriteBuildName(name);
        }
コード例 #3
0
 public static void NormalBuild()
 {
     BundleEditor.Build();
 }
コード例 #4
0
 public static void Build()
 {
     BundleEditor.Build();
     BuildApp.Build();
 }