I made a chat system and when I press the p button on the computer, the chat opens. How can I turn it into a button for mobile?

I made a chat system and when I press the p button on the computer, the chat opens. How can I turn it into a button for mobile?

Create a widget with a canvas and a button. Link button onclick to call a reference to the chat event (the one that was called with the p key)

Create the widget at runtime & add to viewport either though the hud class or in game.

1 Like