I'm completly sure that i'm doing something wrong, but I can't get InputAction to work.
I'm using v0.7.1 (the lastest)
I also tried with v0.6.2, the same happens
Here's my code:
//References
using LethalCompanyInputUtils.Api;
using LethalCompanyInputUtils;
namespace Nose
{
[BepInPlugin(pluginGuid, pluginName, pluginVersion)]
[BepInDependency("com.rune580.LethalCompanyInputUtils", BepInDependency.DependencyFlags.HardDependency)]
public class NoseMod : BaseUnityPlugin
{
//Code
public static InputController InputActionsInstance;
public void Awake()
{
//Code
InputActionsInstance = new InputController();
}
}
public class NosePatch
{
[HarmonyPostfix]
public static void UpdatePCB(GameNetcodeStuff.PlayerControllerB __instance)
{
//code
}
public void SetupKeybindCallbacks()
{
NoseMod.InputActionsInstance.CheatsKey .performed += OnExplodeKeyPressed
}
public void OnExplodeKeyPressed(InputAction.CallbackContext ctx)
{
// Your executing code here
}
}
public class InputController : LcInputActions
{
[InputAction("<Keyboard>/r", Name = "Cheats")]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public InputAction CheatsKey { get; set; } // <- INPUTACTION DOESN'T WORK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
}
The problem is that I can't reference InputAction, I tried with InputActionAttribute but it just doesn't work.
I'm completly sure that i'm doing something wrong, but I can't get InputAction to work. I'm using v0.7.1 (the lastest) I also tried with v0.6.2, the same happens
Here's my code:
The problem is that I can't reference InputAction, I tried with InputActionAttribute but it just doesn't work.