For example, I need my game to press “d” after my character level up (Automatical press “d”).
The point is can we use a thing like a macro key inside Unity?
ps. I try to use with AI.
For example, I need my game to press “d” after my character level up (Automatical press “d”).
The point is can we use a thing like a macro key inside Unity?
ps. I try to use with AI.
I’m confused. Physically pressing the “d” key on some keyboard outside the computer is not something you can do (unless you get into robotics). So you must mean to send a “d” keypress to some application… which application? Your own game?
In that case, you don’t really need a “d” keypress; you just need your game to react as if the “d” key had been pressed. In other words, whatever code you’ve got responding to a “d” key, tell that code to do its thing after your character levels up.
I don’t see what any of this has to do with AI.
It’s a bit of a long shot, but perhaps my video about Unity events will help.
Just call the same function that would normally be called by hitting the letter “d”.
Yeah… that’s what I was trying to say. ![]()