Ejemplo n.º 1
0
 public static void BuildSinglePlatformPackages(PackageSharedBuildInfo sharedBuildInfo, PackagePlatform platform)
 {
     //NOTE: 命令行模式下, ScriptableObject 会被编辑器主动 Destroy, 这里利用一个临时的 GameObject 强制保持引用
     //NOTE: 之后考虑将 data 改为普通对象使用 json 序列化
     using (var hold = ReferenceHolder.Create(sharedBuildInfo.data))
     {
         _BuildPackages(new PackageBuildInfo(sharedBuildInfo, platform, ToBuildTarget(platform)));
     }
 }
Ejemplo n.º 2
0
        // outputPath: 输出的总目录 [可选]
        public PackageBuildInfo(PackageSharedBuildInfo sharedBuildInfo, PackagePlatform buildBuildPlatform, BuildTarget buildTarget)
        {
            _sharedBuildInfo     = sharedBuildInfo;
            _data                = sharedBuildInfo.data;
            _buildPlatform       = buildBuildPlatform;
            _buildTarget         = buildTarget;
            _assetBundlePath     = GetPlatformPath(Combine(sharedBuildInfo.outputPath, data.assetBundlePath), buildTarget);
            _zipArchivePath      = GetPlatformPath(Combine(sharedBuildInfo.outputPath, data.zipArchivePath), buildTarget);
            _packagePath         = GetPlatformPath(Combine(sharedBuildInfo.outputPath, data.packagePath), buildTarget);
            _streamingAssetsPath = Combine(BundleBuilderData.StreamingAssetsPath, Manifest.EmbeddedBundlesBasePath);

            EnsureDirectory(_assetBundlePath);
            EnsureDirectory(_zipArchivePath);
            EnsureDirectory(_packagePath);
            EnsureDirectory(_streamingAssetsPath);
        }
Ejemplo n.º 3
0
 public static void BuildSinglePlatformPackages(PackageSharedBuildInfo sharedBuildInfo, PackagePlatform platform)
 {
     _BuildPackages(new PackageBuildInfo(sharedBuildInfo, platform, ToBuildTarget(platform)));
 }