如何停止检测 Unity 中用户的输入?我想实现以下目标:在 C# 中“不检测 Input.GetMouseButtonDown
”?
最佳答案
您不能只是“关闭”Unity 提供的 Input
类的输入。相反,在您处理输入的地方,添加一个 if 语句。
例如:
void Update() {
if (gameState != GameState.PAUSED) {
if (Input.getMouseButtonDown(0)) {
Debug.Log("Handle click!");
}
}
}
关于c# - 停止检测 Unity 中的输入?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33581217/