Hi there! Is it possible for a script to simulate that the user have clicked? I mean, if an user clicks on the screen it triggers "Input.GetMouseButtonDown(0)" but I need to "re-trigger" this at certain point without another user input. Is that possible? Thank you,
Could you put whatever logic runs after the input check into a function, then just call that function later on? For example: Code (CSharp): public void Update() { if (Input.GetMouseButtonDown(0)) MyClickLogic(); } private void MyClickLogic() { // Do cool stuff }
Thanks for answering. At first I was looking for any kind of method to "fake" that the user has clicked but I've seen that fake inputs is quite hard on Unity. So, I've implement your solution by just moving a couple of things in the script.