Button question! Converting KeyCode to GuiButton

So first I used a script called simulatekey.cs to simulate the press of the button “i” on Guibutton click,
however this wont work with android so I need to change one line in an inventory script to make it work problem is… I dont know how.

On the simulater script I couldve just used "PUBLIC VOID SIMULATE () { //insert simulation code. Where the button triggers on SIMULATE. But with the new inventory script that way wont work, so this is the line:

 public KeyCode onOffButton = KeyCode.I

// where onOffButton is configured to toggle the script on off, how would I convert this line to work with my button?

That’s a great question, I dont think this is possible out of the box with Unity without some funky and more exotic platform specific plugins.

If i were you I would simply mix your code so you ask for

if( IsKeyPressed(KeyCode.I) || IsThatButtonYouMentionClicked?() ) {  }