Ordererd Input?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Luphan
Posts: 13
Joined: Wed Jun 07, 2023 5:39 am

Ordererd Input?

Post by Luphan »

Hi, I'm now working on a project that has a custom layer system which will force input receive object to have a receive order (such as block the character input for movement when I launch some UI that has higher input receive order).

I found it difficult to combine dialogue system's input system into mine.

So far as I know (I've only bought this plugin within less than a month, I could miss something)

The Dialogue System uses "Input Device Manager" to receive input rather from Unity's origin Input or New Input System, and then pass that input to anyone who use it.

so... Is there an easy way for me to block/receive input object in the Dialogue system base on my custom input order?

so far I've only found property "isInputAllowed", I can group all dialogue system into one receiver and disable/enable it. but in this case all the element under dialogue system shares the same input order.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ordererd Input?

Post by Tony Li »

Hi,

Here are two approaches:

1. Simplest: Most likely, it will be fine to enable or disable all Dialogue System input as a whole. If so, use InputDeviceManager.isInputAllowed.

2. Alternative: If you must conditionally only allow some Dialogue System input but not others, you can replace the InputDeviceManager's GetButtonDown, GetButtonUp, and GetInputAxis delegate method. This is what the Rewired integration does, for example. Instead of reading from Unity's built-in Input class, the replaced methods read from Rewired. Similarly for the Input System package, too.
Post Reply