Search Issue Tracker
Fixed in 5.1.4
Votes
0
Found in
5.1.2p3
Issue ID
718696
Regression
No
[IL2CPP] fails to convert unsafe void* to a struct pointer type
Unity Editor with the IL2CPP scripting backend generates an invalid code when the project has a script performing a typecast from unsafe void* to a struct pointer type.
Example:
public void testUnsafe(void* vp) {
*(TestStruct*)vp = new TestStruct(123);
}
This emits the following C++ code:
void* L_0 = ___vp;
TestStruct_t1 L_1 = {0};
TestStruct__ctor_m0(&L_1, ((int32_t)123), /*hidden argument*/NULL);
*L_0 = L_1; // <<< ERROR
return;
Xcode fails to compile the code because *L_0 is not assignable.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Add comment