Issue when toggle to full screen in web player

Hello! I am having a issue when toggle to full screen in web player. I toggle to full screen by this script:

#pragma strict

var fullScreenButton : KeyCode;

function Update()
{

	if(Input.GetKeyDown(fullScreenButton))
	{
		Screen.fullScreen = !Screen.fullScreen;
	}
}

Apparently, all right, but I can only switch between windowed mode and full screen once, then when I activate the full screen and back to windowed mode, I cannot go back to full screen.
Thank you for your attention!
Sorry of my english :stuck_out_tongue:

Is the problem that the key press isn’t detected, or the code to change to fullscreen and back doesn’t work. I guess you set fullScreenButton somewhere. Be worth adding a Debug.Log inside the if.

Hi Graham! I already used the debug.log, and always switch between true and false variable to check the full screen, and the executable for Windows works fine.
Thank you for you time xD