Esempio n. 1
0
        static public void MoveBundleToSideDate(BuildTarget _target)
        {
            Config.LoadConfig();
            string tpath     = GetExportPath(_target);
            string tfullpath = System.IO.Directory.GetCurrentDirectory() + "\\" + Config.sEditorBundleFolder + ExportConfig.sResDataPath;

            tfullpath = tfullpath.Replace("\\", "/");
            MoveToPath(tpath, tfullpath, ExportConfig.GetTartFolder(_target));
        }
Esempio n. 2
0
        static public void MoveBUndleToStreamingPath(BuildTarget _target)
        {
            Config.LoadConfig();
            string tpath     = GetExportPath(_target);
            string tfullpath = System.IO.Directory.GetCurrentDirectory() + "\\" + Config.sStreamingBundleFolder + ExportConfig.sResDataPath;

            tfullpath = tfullpath.Replace("\\", "/");
            MoveToPath(tpath, tfullpath, ExportConfig.GetTartFolder(_target));
            AssetDatabase.Refresh();
        }
Esempio n. 3
0
        override public void OnGUI()
        {
            GUILayout.Label("Platform", EditorStyles.boldLabel);
            int oldSelectedPlatm = ExportSetting.Instance.sSelectedPlatm;
            int oldcompressed    = ExportSetting.Instance.sCompressed;
            int oldsBuildType    = ExportSetting.Instance.sBuildType;

            ExportSetting.Instance.sSelectedPlatm = GUILayout.SelectionGrid(ExportSetting.Instance.sSelectedPlatm, sPlatformList, 3);
            ExportSetting.Instance.sCompressed    = GUILayout.SelectionGrid(ExportSetting.Instance.sCompressed, sCompressed, 2);
            ExportSetting.Instance.sBuildType     = GUILayout.SelectionGrid(ExportSetting.Instance.sBuildType, sBuildType, 4);

            //ExportSetting.Instance.sPathType = GUILayout.SelectionGrid(ExportSetting.Instance.sPathType, sPathType, 2);


            if (oldSelectedPlatm != ExportSetting.Instance.sSelectedPlatm ||
                oldcompressed != ExportSetting.Instance.sCompressed ||
                oldsBuildType != ExportSetting.Instance.sBuildType)
            {
                NeedSaveSetting();
            }

            Config.OnGUI();

            if (GUILayout.Button("Export Assets"))
            {
                ExportAllBundleFullPath(sBuildTarget[ExportSetting.Instance.sSelectedPlatm]);
            }

            if (GUILayout.Button("Creat Infos"))
            {
                var    ttar  = sBuildTarget[ExportSetting.Instance.sSelectedPlatm];
                string tpath = GetExportPath(ttar);
                BuildByteFileInfoFile(tpath, tpath, ttar);
                AssetDatabase.Refresh();
            }

            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button("Move Assets to SidePath"))
            {
                MoveBundleToSideDate(sBuildTarget[ExportSetting.Instance.sSelectedPlatm]);
            }
            if (GUILayout.Button("Move Assets to StreamPath"))
            {
                MoveBUndleToStreamingPath(sBuildTarget[ExportSetting.Instance.sSelectedPlatm]);
            }
            EditorGUILayout.EndHorizontal();

            if (GUILayout.Button("Move to"))
            {
                string toldpath = ExportSetting.Instance.sMoveAssetsFilePath;
                toldpath = EditorUtility.OpenFolderPanel("Move to path", toldpath, "");
                if (!string.IsNullOrEmpty(toldpath) && !toldpath.Equals(ExportSetting.Instance.sMoveAssetsFilePath))
                {
                    ExportSetting.Instance.sMoveAssetsFilePath = toldpath;
                    NeedSaveSetting();
                }
                if (string.IsNullOrEmpty(ExportSetting.Instance.sMoveAssetsFilePath))
                {
                    return;
                }
                Config.LoadConfig();
                BuildTarget _target = sBuildTarget[ExportSetting.Instance.sSelectedPlatm];
                string      tpath   = GetExportPath(_target);
                MoveToPath(tpath, ExportSetting.Instance.sMoveAssetsFilePath, ExportConfig.GetTartFolder(_target));
            }
        }
Esempio n. 4
0
 static public string GetExportPath(BuildTarget target)
 {
     return(Config.sDefaultFolder + ExportConfig.GetTartFolder(target));
 }