Mouse and Joystick Input?
Posted: Mon Jan 30, 2023 1:39 am
Hi!
My mouse input is not working, nor is my keyboard.
I can only interact with the NPC when I hit the (X) button on my PS4 Controller.
It is as if the DialogueSystem is overruling everything else.
I can't press any UI buttons either when I open my PauseMenu.
I have this script that is comunicating with the New Input system in Unity:
Any idea what might cause this or how I can allow both keyboard, mouse and controller?
My mouse input is not working, nor is my keyboard.
I can only interact with the NPC when I hit the (X) button on my PS4 Controller.
It is as if the DialogueSystem is overruling everything else.
I can't press any UI buttons either when I open my PauseMenu.
I have this script that is comunicating with the New Input system in Unity:
Code: Select all
using UnityEngine;
using UnityEngine.InputSystem;
using PixelCrushers.DialogueSystem;
using PixelCrushers.Wrappers;
public class DialogInput : MonoBehaviour
{
public InputMaster controls;
void Awake()
{
controls = new InputMaster();
//controls = new MyControls(); // Use the name of the script the Input System has generated.
}
void OnEnable()
{
//controls.Enable();
InputDeviceManager.RegisterInputAction("Action", controls.Player.Action);
InputDeviceManager.RegisterInputAction("Back", controls.Player.Back);
Input.GetKeyDown(KeyCode.E);
// (Note: Also assumes you've defined an action named Back for Input Device Manager.)
}
void OnDisable()
{
//controls.Disable();
InputDeviceManager.UnregisterInputAction("Action");
InputDeviceManager.UnregisterInputAction("Back");
Input.GetKeyDown(KeyCode.E);
}
}
Any idea what might cause this or how I can allow both keyboard, mouse and controller?