How to unlock the button?

Hi,

Maybe format your code a bit better for readability?

But if you need to have some value / state persist game reboot, you can save your value to player prefs or some file, and then reload it when game starts, and set your objects based on that value.