mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Fixed addressable build failing on Addressable 1.17.17+ (#262)
This commit is contained in:
parent
947c8b8e20
commit
f0e18ea3a5
@ -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)
|
||||||
{
|
{
|
||||||
|
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user