So I am still messing around with my script and adding more and more functionality.
ATM I want to do something like this:
How would I write this? what is the correct way (if any) to do a send-key.
So I am still messing around with my script and adding more and more functionality.
ATM I want to do something like this:
How would I write this? what is the correct way (if any) to do a send-key.
I don’t believe there is a command like that. But why not just execute the code when the button is pushed. Like if you are calling function DoSomething() when you hit the space key, then just call DoSomething() when you bush your GUIButton.
Well the problem with that is, if I press down it will work fine, but I also have a if statement for when you release so, if there a if(GUIbutton- released)
Otherwise that wont really work
So is there a way to say it’s not pressed to do “bla bla bla”
No.
yes there is
just use and or ( || ) statement in your if to make if space is pressed or the the GUI button is pressed.
Hi i want something like that. So the scenario is I only have to get input from a joystick in Unity exe. But i have to run another program with unity exe that does not take joystick input so i have to send it the a simulated event trigger keypress from the exe of Unity when that joystick button is pressed. Can anyone help me with this?
I know this is a bit late of a response, but I am trying to do the same thing. Right now I am using the sendkeys.send function, but am having some trouble getting it to work properly. Let me know if you found a more effective way to do this.
did you ever figure this out? I’m having a similar issue.