Fixed addressable build failing on Addressable 1.17.17+

pull/262/head
zhouxinwei97 2021-05-20 18:31:40 +08:00
parent 947c8b8e20
commit 4cbf622b6d
3 changed files with 1922 additions and 1925 deletions

View File

@ -53,14 +53,11 @@ namespace UnityBuilderAction
if (addressableAssetSettingsType != null) if (addressableAssetSettingsType != null)
{ {
// ReSharper disable once PossibleNullReferenceException, used from try-catch // ReSharper disable once PossibleNullReferenceException, used from try-catch
void CallAddressablesMethod(string methodName, object[] args) => addressableAssetSettingsType
.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public)
.Invoke(null, args);
try try
{ {
CallAddressablesMethod("CleanPlayerContent", new object[] { null }); addressableAssetSettingsType.GetMethod("CleanPlayerContent", BindingFlags.Static | BindingFlags.Public)
CallAddressablesMethod("BuildPlayerContent", Array.Empty<object>()); .Invoke(null, new object[] {null});
addressableAssetSettingsType.GetMethod("BuildPlayerContent", new Type[0]).Invoke(null, new object[0]);
} }
catch (Exception e) catch (Exception e)
{ {

3836
dist/index.js vendored

File diff suppressed because it is too large Load Diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long