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
Please check below link.
Hope it can help you to fix this issue.
a month ago - last edited a month ago
Your issue can not be solved by the link?