Fix reflection code for setting buildAppBundle. Mark AndroidSettings class as static (#512)
This commit is contained in:
@@ -5,7 +5,7 @@ using System.Reflection;
|
|||||||
|
|
||||||
namespace UnityBuilderAction.Input
|
namespace UnityBuilderAction.Input
|
||||||
{
|
{
|
||||||
public class AndroidSettings
|
public static class AndroidSettings
|
||||||
{
|
{
|
||||||
public static void Apply(Dictionary<string, string> options)
|
public static void Apply(Dictionary<string, string> options)
|
||||||
{
|
{
|
||||||
@@ -49,8 +49,8 @@ namespace UnityBuilderAction.Input
|
|||||||
if (options.TryGetValue("androidExportType", out androidExportType) && !string.IsNullOrEmpty(androidExportType))
|
if (options.TryGetValue("androidExportType", out androidExportType) && !string.IsNullOrEmpty(androidExportType))
|
||||||
{
|
{
|
||||||
// Only exists in 2018.3 and above
|
// Only exists in 2018.3 and above
|
||||||
FieldInfo buildAppBundle = typeof(EditorUserBuildSettings)
|
PropertyInfo buildAppBundle = typeof(EditorUserBuildSettings)
|
||||||
.GetField("buildAppBundle", System.Reflection.BindingFlags.Public | BindingFlags.Instance);
|
.GetProperty("buildAppBundle", BindingFlags.Public | BindingFlags.Static);
|
||||||
switch (androidExportType)
|
switch (androidExportType)
|
||||||
{
|
{
|
||||||
case "androidStudioProject":
|
case "androidStudioProject":
|
||||||
|
|||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user