Help me the toggle is stuck

So, i have a vsync option in my options menu. For that one i use a toggle

I made a script that is used at the start of the game to check if the vsync is active and to sync the toggle to the state of the vsync.

It worked, Until now. This piece of code bellow for some reason breaks my toggle. It is stuck.

154431-screenshot-3.png

vsync = the toggle reference

SO HOW THE HELL DID IT BROKE LIKE THAT FOR NO REASON

By stuck i mean that nothing happens when i click on it.

so just change enabled to IsOn and it worked for me