Esempio n. 1
0
        public static bool BuildSingleBundle(BundleData bundle, BundleState state)
        {
            if (bundle == null)
            {
                return(false);
            }

            string outputPath = "";

            EditorCommon.CreateDirectory(outputPath);
            uint crc = 0;

            string[] assetPaths = bundle.includs.ToArray();

            bool succeed = false;

            if (bundle.type == BundleType.UnityMap)
            {
                succeed = BuildSceneBundle(assetPaths, outputPath, out crc);
            }
            else
            {
                succeed = BuildAssetBundle(assetPaths, outputPath, out crc, bundle.type);
            }

            succeed = UpdateBundleState(bundle, state, outputPath, succeed, crc);

            return(succeed);
        }