C# 如何使用Unity中的代码生成点击/点击?
我正在开发一种面部识别功能,当用户眨眼时会产生点击/轻触。有没有一种方法可以通过代码产生点击?看起来我不能使用onMouseDown或Button.onClick,因为没有按钮或鼠标。 基本上,我所拥有的是:C# 如何使用Unity中的代码生成点击/点击?,c#,unity3d,C#,Unity3d,我正在开发一种面部识别功能,当用户眨眼时会产生点击/轻触。有没有一种方法可以通过代码产生点击?看起来我不能使用onMouseDown或Button.onClick,因为没有按钮或鼠标。 基本上,我所拥有的是: public void Blink(){ *code that lets the computer know that user blinked* } 我需要补充的是: public void ClickedByBlinking(){ *some code to producer a c
public void Blink(){
*code that lets the computer know that user blinked* }
我需要补充的是:
public void ClickedByBlinking(){
*some code to producer a click (Blink) }
请尝试使用此鼠标操作。MouseEventMouseOperations.MouseEventFlags.LeftUp 不要使用键盘,而是使用闪烁键