1
0
mirror of synced 2024-11-13 17:50:46 +01:00

fix: Migrate plugin to BepInEx 6 IL2CPP

This commit is contained in:
Repflez 2022-02-22 04:52:10 -07:00
parent d95e3088f9
commit 08c0da7187
2 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,12 @@
using BepInEx;
using BepInEx.IL2CPP;
using BepInEx.Configuration;
using HarmonyLib;
namespace TaikoModStuff
{
[BepInPlugin("TaikoModStuff", PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
public class Plugin : BasePlugin
{
public static ConfigEntry<bool> configForceFontChange;
@ -15,7 +16,7 @@ namespace TaikoModStuff
public static ConfigEntry<int> configCustomFramerate;
public static ConfigEntry<bool> configToggleVSync;
private void Awake()
public override void Load()
{
// Add configurations
configForceFontChange = Config.Bind("General.Toggles",
@ -36,7 +37,7 @@ namespace TaikoModStuff
configCustomFramerate = Config.Bind("General.Framerate",
"CustomFramerate",
60,
"Custom framerate. Use with caution");
"Custom framerate.");
configToggleVSync = Config.Bind("General.Graphics",
"EnableVSync",
@ -51,7 +52,7 @@ namespace TaikoModStuff
instance.PatchAll(typeof(ForceFramerate));
// Plugin startup logic
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
Log.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
}
}
}

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>TaikoModStuff</AssemblyName>
<Description>My first plugin</Description>
<Version>1.2.1</Version>
@ -10,8 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.Core" Version="5.*" />
<PackageReference Include="BepInEx.IL2CPP" Version="6.0.0-*" IncludeAssets="compile" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
<PackageReference Include="UnityEngine.Modules" Version="2020.3.19" IncludeAssets="compile" />
<PackageReference Include="Taiko.GameLibs" Version="1.2.2-r.0" PrivateAssets="all" />