[Unity]Assetbundle打包MP4,在Android平台上无法正常播放的Bug

2020/09 30 19:09

错误显示:

AndroidVideoMedia::OpenExtractor could not translate archive:/XXX to local file. Make sure file exists, is on disk (not in memory) and not compressed.

原来所有AB包的打包方式:

BuildPipeline.BuildAssetBundles(…, BuildAssetBundleOptions.ChunkBasedCompression);

修改方式为打两次包,含有视频文件的AB包采用
BuildPipeline.BuildAssetBundles(…, BuildAssetBundleOptions. UncompressedAssetBundle );

未含有视频文件的AB包使用
BuildPipeline.BuildAssetBundles(…, BuildAssetBundleOptions.ChunkBasedCompression);