Replace built-in input system

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
zod060
Posts: 1
Joined: Sat Oct 28, 2023 12:17 am

Replace built-in input system

Post 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?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Replace built-in input system

Post 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.
}
Post Reply