Search Issue Tracker
Fixed
Fixed in 2021.3.9f1, 2022.1.12f1, 2023.1.0a5
Unknown (hidden) 2022.2.X
Votes
0
Found in
2021.3.8f1
2022.1.11f1
2022.2.0b7
2023.1.0a4
Issue ID
UUM-14015
Regression
Yes
Function with a return type of void*[] causes a C++ compiler error on IL2CPP
Reproduction steps:
- Create a new project
- Import the “NewBehaviourScript.cs” script
- Attach the “NewBehaviourScript.cs” to any GameObject in a scene
- Press File → Build And Run
Expected result: Build is successful
Actual result: Build is not successful, errors in the Console
Reproducible with: 2021.2.0a17, 2021.3.8f1, 2022.1.0a1, 2022.1.11f1, 2022.2.0a1, 2022.2.0b7, 2023.1.0a4
Not reproducible with: 2020.3.39f1, 2021.2.0a16, 2021.3.9f1, 2022.1.12f1, 2022.1.15f1, 2023.1.0a5, 2023.1.0a9
Reproduced on: Windows 10
Note: project won’t build if affected by this bug
Part of error:
Building Library\Bee\artifacts\WinPlayerBuildProgram\u1oik\i9ie_bly-CSharp.obj failed with output:
Assembly-CSharp.cpp
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(443): error C2440: '=': cannot convert from 'void' to 'VoidU2AU5BU5D_tDABEC795D8DD5AF263B91D9FE3AC7C4BCA43E6D1 '
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(443): note: Expressions of type void cannot be converted to other types
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(608): error C2562: 'void_ptrArray2_ToArray_mE715C8AA2265AA1865F180299561234D5A8D80D9': 'void' function returning a value
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(557): note: see declaration of 'void_ptrArray2_ToArray_mE715C8AA2265AA1865F180299561234D5A8D80D9'
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(703): error C2440: '=': cannot convert from 'void' to 'VoidU2AU5BU5D_tDABEC795D8DD5AF263B91D9FE3AC7C4BCA43E6D1 '
C:\Users\oleh.halytskyi\UnityProjects\cppThing\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp(703): note: Expressions of type void cannot be converted to other types
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Reordering Enum Values in VFX Graph Uint Property expands the “Value” field
- Visual Effect Graph sample titles display in non-human-readable format
- UxmlNamespacePrefix does not apply when using UIBuilder documents
- UI Builder Data Path Source List starts flickering and scrolling when trying to select the last item in the list
- Crash on ProcessSceneBeforeExport when analyzing selected Addressables rules in a specific project
Resolution Note (fix version 2023.1.0a5):
Fixed in 2023.1.0a5
Resolution Note (fix version 2022.1.12f1):
Fixed in 2022.1.12f1
Resolution Note (fix version 2021.3.9f1):
Fixed in 2021.3.9f1