10-24-2018
07:00 AM
- last edited on
10-24-2018
03:53 PM
by
VibrantNebula
10-24-2018
07:00 AM
- last edited on
10-24-2018
03:53 PM
by
VibrantNebula
Has anyone had any success in getting the Viveport SDK for Unity to work with Unity's IL2CPP build option?
I'm trying to integrate the Viveport SDK with my game, but when I build with the IL2CPP option and try to run it, I see this exception which prevents the Viveport API from trying to initialize:
NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. at Viveport.Internal.Api.Init (Viveport.Internal.StatusCallback initCallback, System.String appId) [0x00000] in <00000000000000000000000000000000>:0
I don't get this issue when running within the editor, or if I run a build of game with the Mono build option - the SDK works fine for both of those. This issue only happens for IL2CPP, which is unfortunate, because the game has better performance when built with IL2CPP. I'm using Windows 10 Pro, 64-bit, Unity 2018.2.13f1, and Viveport SDK 1.7.10 (via the Unity package in the SDK).
My code is pretty much just the example code in the SDK docs (but with my own VIVEPORT_ID obviously). This issue appears to be happening inside the internal API.Init method when it is trying to make the call to the DLL.
Does anyone have any solutions/ideas, or is the Viveport SDK for Unity simple not compatible with the IL2CPP build option? If not, then how do we request for the Viveport SDK for Unity to support IL2CPP?
11-01-2018
03:28 AM
- last edited on
11-01-2018
12:12 PM
by
VibrantNebula
11-01-2018
03:28 AM
- last edited on
11-01-2018
12:12 PM
by
VibrantNebula
Hi @andyman404:
Please check below link.
https://answers.unity.com/questions/1229036/callbacks-from-c-to-c-are-not-working-in-540f3.html
Hope it can help you to fix this issue.
01-20-2019
11:12 PM
- last edited
a month ago
by
VibrantNebula
01-20-2019
11:12 PM
- last edited
a month ago
by
VibrantNebula
a month ago - last edited a month ago
a month ago - last edited a month ago
Hi Chiranjeev:
Your issue can not be solved by the link?
https://answers.unity.com/questions/1229036/callbacks-from-c-to-c-are-not-working-in-540f3.html
Regards.
Yaking