Fix reflection code for setting buildAppBundle. Mark AndroidSettings class as static (#512)

This commit is contained in:
AndrewKahr 2023-02-20 10:25:03 -08:00 committed by GitHub
parent 7f2782d3ed
commit c7a5c0640a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ using System.Reflection;
namespace UnityBuilderAction.Input
{
public class AndroidSettings
public static class AndroidSettings
{
public static void Apply(Dictionary<string, string> options)
{
@ -49,8 +49,8 @@ namespace UnityBuilderAction.Input
if (options.TryGetValue("androidExportType", out androidExportType) && !string.IsNullOrEmpty(androidExportType))
{
// Only exists in 2018.3 and above
FieldInfo buildAppBundle = typeof(EditorUserBuildSettings)
.GetField("buildAppBundle", System.Reflection.BindingFlags.Public | BindingFlags.Instance);
PropertyInfo buildAppBundle = typeof(EditorUserBuildSettings)
.GetProperty("buildAppBundle", BindingFlags.Public | BindingFlags.Static);
switch (androidExportType)
{
case "androidStudioProject":

BIN
dist/index.js.map generated vendored

Binary file not shown.