Input Device Manager to cancel cutscene

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
OscarS
Posts: 17
Joined: Mon Jul 17, 2023 1:47 pm

Input Device Manager to cancel cutscene

Post by OscarS »

Hi!

I'm trying to stop a conversation and jump to another one when the player keeps a button pressed for some time. I use the Unity New Input System with the Input Device Manager. When I try to count the time when the button is pressed I use this:

if (InputDeviceManager.IsButtonDown("Back"))

On an update function. But it seems that it only counts "1 time" when the button is pressed and not continuously. Is there some way yo check constantly if the button is pressed with the InpuDeviceManager?

Thanks!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Input Device Manager to cancel cutscene

Post by Tony Li »

Hi,

No, the Input Device Manager only checks if a button was pressed (IsButtonDown) or released (IsButtonUp) in the current frame. It's equivalent in concept to the built-in Input class's GetButtonDown() and GetbuttonUp() methods (except it can read from the new Input System).
Post Reply