BuildPipeline.BuildAssetBundleExplicitAssetNames

切换到手册
Obsolete public static bool BuildAssetBundleExplicitAssetNames (Object[] assets, string[] assetNames, string pathName, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);
Obsolete public static bool BuildAssetBundleExplicitAssetNames (Object[] assets, string[] assetNames, string pathName, out uint crc, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);

参数

assets要构建到资源包中的/资源/集合。资源包可包含在项目文件夹中找到的所有资源。
assetNames一组字符串,大小与资源数量相同。 这些字符串可用作资源名称,随后您可以将其传递给 AssetBundle.Load 以加载特定资源。使用 BuildAssetBundle,便可改用资源的路径名称。
pathName压缩资源包的目标写入位置。
assetBundleOptions自动包括依赖项或始终包括完整的资源,而不仅仅是确切的引用对象。
targetPlatform要使用资源包的平台。
crc一个可选输出参数,用于获取生成的 AssetBundle 的 CRC 校验和。(用于在使用 UnityWebRequestAssetBundle.GetAssetBundle() 下载 AssetBundle 时验证其内容。)

描述

使用资源的自定义名称构建资源包。

如果构建成功,该函数将返回布尔值 true,否则返回 false。\ 注意:指定字符串将会增加资源包的大小。构建日志中显示的内置 AssetBundle 数据是指字符串大小。

另请参阅:BuildAssetBundleAssetBundle 类、DownloadHandlerAssetBundle

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961