Arduino Input with Dialogue System?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jchamb
Posts: 1
Joined: Tue Feb 18, 2025 3:51 pm

Arduino Input with Dialogue System?

Post by jchamb »

Hi. I'm working with an Arduino to create a custom game controller and have data from it coming into Unity via serial communication. I was wondering if there's any way to connect this input to the dialogue system? I have two buttons, one I want to to choose a conversation reply, and another one selects it. Thanks!
User avatar
Tony Li
Posts: 23254
Joined: Thu Jul 18, 2013 1:27 pm

Re: Arduino Input with Dialogue System?

Post by Tony Li »

Hi,

Assuming you're using Unity UI, I recommend making an input module. You could make it a subclass of StandaloneInputModule and read input from the Arduino instead of the Input class. This way you can use your Arduino with any UI, not just the Dialogue System.

If you don't want to do that, you can always write your own implementation of the Dialogue System's IDialogueUI C# interface, starting with a copy of TemplateDialogueUI.cs to get a head start. Or make subclasses of StandardUISubtitlePanel and StandardUIMenuPanel if you want to inherit all of the functionality of the Standard Dialogue UI system and just add support for Arduino input.
Post Reply