I am making a loading screen, where there will be a 4-second animation of (fake) loading and after that loading texts disappear. Then the text “Press any key” appears to open the level. As the text suggests, the player can press any key and open the level.
But, I want to ensure that any key pressed during that 4 seconds should not be taken as input. Otherwise, it opens the level before the animation is over.
So, is there any way to disable input for that moment and enabling afterwards?