Skip to content

Commit b234c91

Browse files
committed
Merge pull request #69 from philipcass/patch-1
Fix for standalone builds defaulting to int parameters
2 parents 1534030 + 1c73880 commit b234c91

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

Unity/Assets/NativeScript/Editor/GenerateBindings.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10573,18 +10573,21 @@ StringBuilder output
1057310573
for (int i = 0; i < parameters.Length; ++i)
1057410574
{
1057510575
ParameterInfo param = parameters[i];
10576-
if (param.Kind == TypeKind.FullStruct)
10577-
{
10578-
AppendCsharpTypeFullName(
10579-
param.ParameterType,
10580-
output);
10581-
output.Append(" param");
10582-
output.Append(i);
10583-
}
10584-
else
10576+
switch (param.Kind)
1058510577
{
10586-
output.Append("int param");
10587-
output.Append(i);
10578+
case TypeKind.FullStruct:
10579+
case TypeKind.Primitive:
10580+
case TypeKind.Enum:
10581+
AppendCsharpTypeFullName(
10582+
param.ParameterType,
10583+
output);
10584+
output.Append(" param");
10585+
output.Append(i);
10586+
break;
10587+
default:
10588+
output.Append("int param");
10589+
output.Append(i);
10590+
break;
1058810591
}
1058910592
if (i != parameters.Length-1)
1059010593
{
@@ -13639,4 +13642,4 @@ static string InjectIntoString(
1363913642
}
1364013643
}
1364113644
}
13642-
}
13645+
}

0 commit comments

Comments
 (0)