Beispiel #1
0
        private void BuildAppOnly()
        {
            if (mBuildPlatform == BuildPlatform.Android)
            {
                BuildPlatformConfig config = AssetBuilderConfig.GetConfig(BuildPlatform.Android);
                string appSavePath         = "../app/" + config.platformName + "/";

                string        platformName   = mAppPlatform.ToString();
                string        gameConfigPath = string.Format(Directory.GetParent(UnityEngine.Application.dataPath) + "/PlatformData/{0}/android/config.game", platformName);
                string        json           = File.ReadAllText(gameConfigPath);
                AppGameConfig gameCfg        = AppGameConfig.FromJson(json);

                AssetBuilderCtrl.PackAndroidApp(config, appSavePath, platformName, mAppPackMode.ToString(), gameCfg, AssetBuilderConfig.IsSplashEnabled(mAppPlatform), AppResSize.Normal);
            }
            else if (mBuildPlatform == BuildPlatform.IOS)
            {
                BuildPlatformConfig config = AssetBuilderConfig.GetConfig(BuildPlatform.IOS);
                string appSavePath         = "../app/" + config.platformName + "/";

                string        platformName   = mAppPlatform.ToString();
                string        gameConfigPath = string.Format(Directory.GetParent(UnityEngine.Application.dataPath) + "/PlatformData/{0}/ios/config.game", platformName);
                string        json           = File.ReadAllText(gameConfigPath);
                AppGameConfig gameCfg        = AppGameConfig.FromJson(json);

                AssetBuilderCtrl.PackIOSApp(config, appSavePath, mAppPlatform.ToString(), mAppPackMode.ToString(), gameCfg, AppResSize.Normal);
            }
        }
Beispiel #2
0
 private void BuildApp()
 {
     if (mBuildPlatform == BuildPlatform.Android)
     {
         BuildPlatformConfig config = AssetBuilderConfig.GetConfig(BuildPlatform.Android);
         string bundlePath          = GetResPath(config);
         string appSavePath         = "../app/" + config.platformName + "/";
         AssetBuilderCtrl.BuildAndroidApp(config, bundlePath, appSavePath, mAppPlatform.ToString(), mAppPackMode.ToString(), mAppResSize, AssetBuilderConfig.IsSplashEnabled(mAppPlatform));
     }
     else if (mBuildPlatform == BuildPlatform.IOS)
     {
         BuildPlatformConfig config = AssetBuilderConfig.GetConfig(BuildPlatform.IOS);
         string bundlePath          = GetResPath(config);
         string appSavePath         = "../app/" + config.platformName + "/";
         AssetBuilderCtrl.BuildIOSApp(config, bundlePath, appSavePath, mAppPlatform.ToString(), mAppPackMode.ToString(), mAppResSize, mAddGarbageCode);
     }
     else if (mBuildPlatform == BuildPlatform.Win)
     {
         BuildPlatformConfig config = AssetBuilderConfig.GetConfig(BuildPlatform.Win);
         string bundlePath          = GetResPath(config);
         string appSavePath         = "../app/" + config.platformName + "/";
     }
 }