BepInEx / BepInEx.ConfigurationManager

Plugin configuration manager for BepInEx
https://www.patreon.com/ManlyMarco
GNU Lesser General Public License v3.0
227 stars 54 forks source link

Doesn't Support Games Using Unity Input System package #45

Closed hippolippo closed 2 years ago

hippolippo commented 2 years ago

The way that the ConfigurationManager detects key input only works with the UnityEngine.Input class but some games use the Unity Input System package instead which gives this error in the Player.log file:

(Filename: D:/SVN/BepInEx.ConfigurationManager/ConfigurationManager/ConfigurationManager.cs Line: 597)

InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
  at (wrapper managed-to-native) UnityEngine.Input.GetKeyDownInt(UnityEngine.KeyCode)
  at UnityEngine.Input.GetKeyDown (UnityEngine.KeyCode key) [0x00001] in <dc91b8bd68954aeba15a42ea03c6382c>:0 
  at BepInEx.Configuration.KeyboardShortcut.IsDown () [0x0000c] in <23c82cada6174aeea1f2659206cab34d>:0 
  at ConfigurationManager.ConfigurationManager.Update () [0x0001d] in D:\SVN\BepInEx.ConfigurationManager\ConfigurationManager\ConfigurationManager.cs:597 

An example of a game that uses this system is the Farewell North demo: https://store.steampowered.com/app/1432850/Farewell_North/

ManlyMarco commented 2 years ago

Solved in 644f0dd963d984a48611abb705a56da583d5054a