Problems integrating Unity's new input system

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ignaxavier
Posts: 2
Joined: Tue Oct 01, 2024 4:24 pm

Problems integrating Unity's new input system

Post by Ignaxavier »

Hi everyone, I am a newbie in Dialogue System, I am using it for the first time in a project in which I have integrated the new input system of Unity.
In my project, I created on one side a singleton that is in charge of storing delegates for each action, and each time they are triggered, they execute all the methods that subscribed to each method.
Screenshot_56.png
Screenshot_56.png (57.15 KiB) Viewed 89 times
Screenshot_57.png
Screenshot_57.png (40.46 KiB) Viewed 89 times
Now, in my Input Action Asset, I have two Action Maps: one for the UI and the other for the Gameplay.
Why do I do this? To have a better control of the inputs, so when I interact with a note, for example, I change the Action Map so that only the UI actions are triggered.
Screenshot_58.png
Screenshot_58.png (13.51 KiB) Viewed 89 times
Screenshot_59.png
Screenshot_59.png (9.62 KiB) Viewed 89 times
Well, my problem starts with the Dialogue System Input Device interfering with my InputManager, I watched the video tutorial but it didn't help me much, I would need to find an alternative to bypass the Input Device or something like that. To control the inputs as I was doing and not generate a lot of spaghetti code.
Any advice or tips?
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problems integrating Unity's new input system

Post by Tony Li »

Hi,

The Dialogue System's InputDeviceManager is really only used by the Selector, ProximitySelector, and UIButtonKeyTrigger components. If you aren't using any of these components and don't want to write a small script to interface your input actions with the InputDeviceManager, you can clear everything on the Dialogue Manager's InputDeviceManager such as the Keys/Buttons/Axes To Check and the Submit and Back fields.

Dialogue UIs and quest log windows use Unity UI's EventSystem. They don't read from the InputDeviceManager. As long as your regular Unity UI EventSystem works, the rest of the Dialogue System will work fine with it.
Ignaxavier
Posts: 2
Joined: Tue Oct 01, 2024 4:24 pm

Re: Problems integrating Unity's new input system

Post by Ignaxavier »

That's the part I wasn't understanding, thank you.
I was able to do what I wanted to do, basically I had to call the Fire() Method of the Dialogue System Trigger, now it works.
Thank you very much. :D
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Problems integrating Unity's new input system

Post by Tony Li »

Glad to help!
Post Reply