[Android] Return type within the C# import for the C++ binding function is always void
JmgrArt opened this issue · comments
I tried adding another abstract method returning bool in the AbstractBaseBallScript example class and calling the generator (after manually adding a stub override in BaseBallScript to prevent a compilation error in Unity), but the return type of the generated C# binding function is always void. This results in a compilation error when building a player for Android. Building for the Editor is working as expected.
The following change seems to fix the issue: (in the file GenerateBindings.cs, at line 8688)
// C# import for the C++ binding function
AppendCsharpImport(
GetTypeName(type),
typeParams,
funcName,
invokeParams,
typeof(void),
builders.CsharpImports);
Into:
// C# import for the C++ binding function
AppendCsharpImport(
GetTypeName(type),
typeParams,
funcName,
invokeParams,
invokeMethod.ReturnType,
builders.CsharpImports);