Page 1 of 1

Replace built-in input system

Posted: Sat Oct 28, 2023 12:28 am
by zod060
Hello. I'm using unity's new input system & my own input algorithm.

I just simply want to replace your built-in input system with mine

Image

I tried to figure out myself but it didn't work.
How can I call or deliver certain input data to dialogue system?

Re: Replace built-in input system

Posted: Sat Oct 28, 2023 9:18 am
by Tony Li
Hi,

Assign your replacement methods to InputDeviceManager.instance.GetButtonDown, GetButtonUp, and GetAxis. Example:

Code: Select all

void Start()
{
    InputDeviceManager.instance.GetButtonDown = MyGetButtonDownMethod;
}

bool MyGetButtonDownMethod(string buttonName)
{
    // Here, return true if the button was just pressed down this frame. Otherwise return false.
}