OnMouseUP sometimes doesn't work

Hi All.

Just wondering if anyone else has experienced this before. I have a simple script that uses function OnMouseUp() to instantiate a menu, however I have noticed sometimes it doesn’t work depending on how much stuff is going on on screen.

Has this this happended to you? Did you fix it?

Thanks

Steve

You would not have it in the FixedUpdate?

If so, you need to place it in the Update.

You’d mostly be checking for the input in one of your Update functions.

 void Update()
    {
    if (Input.GetMouseButtonUp (0)) 
    		{
    			//do something
    		}
    }

If you’re in update then you’re checking every frame and shouldn’t miss any input ticks. If the above function were within FixedUpdate() then you’re checking at regular timed intervals and might miss the Down or Up parts of checks.