Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何停止在 Unity 中检测用户的输入?我想实现以下目标:“不检测Input.GetMouseButtonDown”在 C# 中?
Input.GetMouseButtonDown
您不能只是“关闭” InputUnity 提供的类的输入。相反,在您处理输入的地方,添加一个 if 语句。
Input
例如:
void Update() { if (gameState != GameState.PAUSED) { if (Input.getMouseButtonDown(0)) { Debug.Log("Handle click!"); } } }