How do i block a level, in the menu, so the player are only able to play it if he finished the last one?

I already have 6 levels in my mobile game… i just want to make a simple system, where you are only going to be able to play level 2 if you finished 1 already…

I would make a bunch of boolean variables in GameMode for each level (call them “Level##Completed”, or something), and when the condition that sets that level as completed is met, you also change the respective bool var.

Then in the menu, you bind the ‘enable’ of each level’s button to the previous level LevelCompleted variable. That way when it’s set to true, it will automatically enable the appropriate button.