Fix reflection code for setting buildAppBundle. Mark AndroidSettings class as static

pull/512/head
Andrew Kahr 2023-02-18 17:15:04 -08:00
parent f58ac29d5b
commit 8f2d8f2b35
2 changed files with 4 additions and 4 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":

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long