|
|
@ -88,9 +88,9 @@ public class MagnificentVoiceChat : MonoBehaviour |
|
|
ProductName = "WW1Test", |
|
|
ProductName = "WW1Test", |
|
|
ProductVersion = "1.0.0.0", |
|
|
ProductVersion = "1.0.0.0", |
|
|
#if UNITY_GAMECORE
|
|
|
#if UNITY_GAMECORE
|
|
|
AllocateMemoryFunction = Marshal.GetFunctionPointerForDelegate((SystemLibrary.AllocateMemoryFunc)SystemLibrary.AllocateMemory), |
|
|
|
|
|
ReallocateMemoryFunction = Marshal.GetFunctionPointerForDelegate((SystemLibrary.ReallocateMemoryFunc)SystemLibrary.ReallocateMemory), |
|
|
|
|
|
ReleaseMemoryFunction = Marshal.GetFunctionPointerForDelegate((SystemLibrary.ReleaseMemoryFunc)SystemLibrary.ReleaseMemory), |
|
|
|
|
|
|
|
|
AllocateMemoryFunction = Marshal.GetFunctionPointerForDelegate((EOSNativeHelper.AllocateMemoryFunc)EOSNativeHelper.AllocateMemory), |
|
|
|
|
|
ReallocateMemoryFunction = Marshal.GetFunctionPointerForDelegate((EOSNativeHelper.ReallocateMemoryFunc)EOSNativeHelper.ReallocateMemory), |
|
|
|
|
|
ReleaseMemoryFunction = Marshal.GetFunctionPointerForDelegate((EOSNativeHelper.ReleaseMemoryFunc)EOSNativeHelper.ReleaseMemory), |
|
|
#endif
|
|
|
#endif
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
@ -368,13 +368,13 @@ public class MagnificentVoiceChat : MonoBehaviour |
|
|
|
|
|
|
|
|
private void LoadLibrary() |
|
|
private void LoadLibrary() |
|
|
{ |
|
|
{ |
|
|
eosLbraryHandle = SystemLibrary.LoadLibrary($@"Assets\Plugins\EpicOnlineServices\Bin\{Config.LibraryName}.dll"); |
|
|
|
|
|
|
|
|
eosLbraryHandle = EOSNativeHelper.LoadLibrary($@"Assets\Plugins\EpicOnlineServices\Bin\{Config.LibraryName}.dll"); |
|
|
if (eosLbraryHandle == IntPtr.Zero) |
|
|
if (eosLbraryHandle == IntPtr.Zero) |
|
|
{ |
|
|
{ |
|
|
throw new Exception("Could not load EOS library!"); |
|
|
throw new Exception("Could not load EOS library!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Bindings.Hook(eosLbraryHandle, SystemLibrary.GetProcAddress); |
|
|
|
|
|
|
|
|
Bindings.Hook(eosLbraryHandle, EOSNativeHelper.GetProcAddress); |
|
|
|
|
|
|
|
|
Debug.Log("Hooked EOS library bindings"); |
|
|
Debug.Log("Hooked EOS library bindings"); |
|
|
status.AppendLine("Hooked EOS library bindings"); |
|
|
status.AppendLine("Hooked EOS library bindings"); |
|
|
@ -388,7 +388,7 @@ public class MagnificentVoiceChat : MonoBehaviour |
|
|
|
|
|
|
|
|
if (eosLbraryHandle != IntPtr.Zero) |
|
|
if (eosLbraryHandle != IntPtr.Zero) |
|
|
{ |
|
|
{ |
|
|
SystemLibrary.FreeLibrary(eosLbraryHandle); |
|
|
|
|
|
|
|
|
EOSNativeHelper.FreeLibrary(eosLbraryHandle); |
|
|
eosLbraryHandle = IntPtr.Zero; |
|
|
eosLbraryHandle = IntPtr.Zero; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|