Merge pull request #18 from timedroid/master
Fix compatability with BepInEx BE
This commit is contained in:
commit
fd375f2659
@ -29,7 +29,7 @@
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Configurations>Release-BepInEx6;Release-BepInEx5;Debug-BepInEx6;Debug-BepInEx5</Configurations>
|
||||
<Platforms>AnyCPU</Platforms>
|
||||
<TargetFrameworks>net48;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release-BepInEx5' ">
|
||||
|
@ -1,10 +1,9 @@
|
||||
#if TAIKO_IL2CPP
|
||||
using HarmonyLib;
|
||||
using Il2CppInterop.Common.Attributes;
|
||||
using Il2CppInterop.Runtime;
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using Il2CppSystem;
|
||||
using UnhollowerBaseLib;
|
||||
using UnhollowerBaseLib.Attributes;
|
||||
using UnhollowerBaseLib.Runtime;
|
||||
using Il2CppException = UnhollowerBaseLib.Il2CppException;
|
||||
|
||||
namespace TakoTako;
|
||||
|
||||
@ -20,7 +19,9 @@ public static class Il2cppRedirection
|
||||
var outPtr = IntPtr.Zero;
|
||||
numPtr[1] = (System.IntPtr) (&outPtr);
|
||||
System.IntPtr exc = System.IntPtr.Zero;
|
||||
var field = (System.IntPtr) AccessTools.Field(typeof(PlayDataManager), "NativeMethodInfoPtr_GetMusicInfoExAll_Public_Void_Int32_byref_ArrayOf_MusicInfoEx_0").GetValue(null);
|
||||
var fieldInfo = AccessTools.Field(typeof(PlayDataManager), "NativeMethodInfoPtr_GetMusicInfoExAll_Public_Void_Int32_byref_Il2CppStructArray_1_MusicInfoEx_0") ??
|
||||
AccessTools.Field(typeof(PlayDataManager), "NativeMethodInfoPtr_GetMusicInfoExAll_Public_Void_Int32_byref_ArrayOf_MusicInfoEx_0");
|
||||
var field = (System.IntPtr)fieldInfo.GetValue(null);
|
||||
IL2CPP.il2cpp_runtime_invoke(field, IL2CPP.Il2CppObjectBaseToPtrNotNull(instance), (void**) numPtr, ref exc);
|
||||
dst = new Il2CppStructArray<MusicInfoEx>(outPtr);
|
||||
Il2CppException.RaiseExceptionIfNecessary(exc);
|
||||
|
@ -12,8 +12,7 @@ using System.Threading.Tasks;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib;
|
||||
#if TAIKO_IL2CPP
|
||||
using UnhollowerBaseLib;
|
||||
using BepInEx.IL2CPP.Utils.Collections;
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using Object = Il2CppSystem.Object;
|
||||
#endif
|
||||
using Newtonsoft.Json;
|
||||
|
@ -3,9 +3,11 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using Il2CppInterop.Runtime;
|
||||
using Il2CppInterop.Runtime.InteropTypes;
|
||||
#if TAIKO_IL2CPP
|
||||
using Array = Il2CppSystem.Array;
|
||||
using UnhollowerBaseLib;
|
||||
#endif
|
||||
|
||||
namespace TakoTako.Patches;
|
||||
|
@ -7,8 +7,8 @@ using HarmonyLib;
|
||||
using TakoTako.Patches;
|
||||
using UnityEngine;
|
||||
#if TAIKO_IL2CPP
|
||||
using BepInEx.IL2CPP.Utils;
|
||||
using BepInEx.IL2CPP;
|
||||
using BepInEx.Unity.IL2CPP.Utils;
|
||||
using BepInEx.Unity.IL2CPP;
|
||||
#endif
|
||||
|
||||
#pragma warning disable BepInEx002
|
||||
|
@ -27,7 +27,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework Condition="$(DefineConstants.Contains('TAIKO_IL2CPP'))">netstandard2.1</TargetFramework>
|
||||
<TargetFramework Condition="$(DefineConstants.Contains('TAIKO_IL2CPP'))">net6.0</TargetFramework>
|
||||
<TargetFramework Condition="$(DefineConstants.Contains('TAIKO_MONO'))">net48</TargetFramework>
|
||||
<AssemblyName>com.fluto.takotako</AssemblyName>
|
||||
<Description>A suite of mods that allow for Custom Songs and Taiko Drum support</Description>
|
||||
@ -42,8 +42,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="$(DefineConstants.Contains('TAIKO_IL2CPP'))">
|
||||
<PackageReference Include="BepInEx.IL2CPP" Version="6.0.0-be.574" IncludeAssets="compile" />
|
||||
<Reference Include="$(GameDir)\BepInEx\unhollowed\*.dll" Private="false" />
|
||||
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.663" />
|
||||
<Reference Include="$(GameDir)\BepInEx\interop\*.dll" Private="false" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="$(DefineConstants.Contains('TAIKO_MONO'))">
|
||||
|
Loading…
Reference in New Issue
Block a user