I use SharpDX.DirectInput in Unity. Today, I need IL2Cpp Project. but IL2Cpp say
IL2CPP error for method 'System.Void SharpDX.Utilities::Read(System.IntPtr,T&)' in assembly 'C:\Workspace\Unity\aicfve-previz\PrevizUnityEditor\Temp\StagingArea\Data\Managed\SharpDX.dll'
Additional information: Build a development build for more information. NotImplementedException
Next, I check SharpDX source code
public unsafe static void Read<T>(IntPtr source, ref T data) where T : struct
{
data = *(T*)(void*)source;
}
In the first time , I want remove this code, but when I check using .the bad thing for me.
Usages Of 'Read<T>(...)'
Get<T>(int):T (in SharpDX.DataBuffer)
GetDataAs<T>():T (in SharpDX.Multimedia.RiffChunk)
GetCurrentState(ref T):void (in SharpDX.DirectInput.CustomDevice)
SharpDX class used Read function.
public unsafe void GetCurrentState(ref T data)
{
int num = Utilities.SizeOf<TRaw>();
byte* numPtr = stackalloc byte[num * 2];
TRaw data1 = default (TRaw);
this.GetDeviceState(num, (IntPtr) ((void*) numPtr));
// here!!!
Utilities.Read<TRaw>((IntPtr) ((void*) numPtr), ref data1);
data.MarshalFrom(ref data1);
}
I use SharpDX.DirectInput in Unity. Today, I need IL2Cpp Project. but IL2Cpp say
Next, I check SharpDX source code
In the first time , I want remove this code, but when I check using .the bad thing for me.
SharpDX class used Read function.
how I solve problem. Thank you.