Skip to content

Commit f0e18ea

Browse files
authoredMay 20, 2021
Fixed addressable build failing on Addressable 1.17.17+ (#262)
1 parent 947c8b8 commit f0e18ea

File tree

3 files changed

+1933
-1936
lines changed

3 files changed

+1933
-1936
lines changed
 

‎dist/default-build-script/Assets/Editor/UnityBuilderAction/Builder.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,11 @@ public static void BuildProject()
5353
if (addressableAssetSettingsType != null)
5454
{
5555
// ReSharper disable once PossibleNullReferenceException, used from try-catch
56-
void CallAddressablesMethod(string methodName, object[] args) => addressableAssetSettingsType
57-
.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public)
58-
.Invoke(null, args);
59-
6056
try
6157
{
62-
CallAddressablesMethod("CleanPlayerContent", new object[] { null });
63-
CallAddressablesMethod("BuildPlayerContent", Array.Empty<object>());
58+
addressableAssetSettingsType.GetMethod("CleanPlayerContent", BindingFlags.Static | BindingFlags.Public)
59+
.Invoke(null, new object[] {null});
60+
addressableAssetSettingsType.GetMethod("BuildPlayerContent", new Type[0]).Invoke(null, new object[0]);
6461
}
6562
catch (Exception e)
6663
{

0 commit comments

Comments
 (0)