Input.GetMouseButtonUp not working properly

I’m using this function in my script: Input.GetMouseButtonUp(0).

But sometimes the “mouse button up” is not detected. I mean when the player releases the mouse button, the function doesn’t return true. This function is critical to my game.

How can I solve this problem?

I guess you use this function in FixedUpdate. You have to use it in Update. Event might get lost in FixedUpdate. That’s because FixedUpdate might not run every frame but the input is processed / generated each frame.

If that’s not the problem, post your code. Feel free to edit your question.