代码相关:
https://www.cnblogs.com/jietian331/p/14446825.html
https://blog.youkuaiyun.com/u011366226/article/details/104506802
https://docs.unity3d.com/Packages/com.unity.addressables@1.9/api/UnityEngine.AddressableAssets.Addressables.html
1.创建新组
AddressableAssetSettingsDefaultObject.Settings.CreateGroup(string groupName, bool setAsDefaultGroup, bool readOnly, bool postEvent, List<AddressableAssetGroupSchema> schemasToCopy, params Type[] types)
2.查找组
AddressableAssetSettingsDefaultObject.Settings.FindGroup(string groupName):AddressableAssetGroup
3.创建组对应的模式
List<AddressableAssetGroupSchema> SchemaList = new List<AddressableAssetGroupSchema>();
//bundle模式
BundledAssetGroupSchema bundleSchema = new BundledAssetGroupSchema();
//设置打包规则:PackTogether整组打到一个包 PackSeparately组内的每个entry打一个包 PackTogetherByLabel组内同一个标签的资源打到一个包
bundleSchema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogetherByLabel;
//设置发布路径 AddressableAssetSettings.kRemoteBuildPath->profiler设置的路径
bundleSchema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kRemoteBuildPath);
//设置加载路径 AddressableAssetSe