This question was
closed Jun 29, 2018 at 05:07 AM by
admadea for the following reason:
Found a work-around.
Question by
admadea · Jun 29, 2018 at 04:23 AM ·
uitogglefullscreen
Issues with fullscreen toggle
My fullscreen toggle isn't working. Here's the relevant code.
public void SetResolution(int resolutionIndex)
{
Resolution resolution = resolutions[resolutionIndex];
Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen, resolution.refreshRate);
}
public void SetFullscreen(bool isFullscreen)
{
Screen.fullScreen = !isFullscreen;
Debug.Log(Screen.fullScreen);
Debug.Log(toggle.isOn);
}
Have a picture so you can already see that yes, my onValueChange is set to dynamic.
Screen.fullscreen appears to always be True, even when my toggle is returning False. I tried commenting out my SetResolution function, to see if it had any influence on what was happening, but nothing had changed. What am I overlooking?
screenshot-8.png
(157.6 kB)
Comment
Follow this Question
Related Questions
Enabling and Disabling a Canvas 1 Answer
Trouble switching between UI buttons 0 Answers
I want Toggle Group Savescript. When i restart the game. the game disable all toggle. 0 Answers
Disabling the AudioListener works in Editor but not in Build. 2 Answers
Canvas behaves differently on PC fullscreen and WebGL fullscreen 0 Answers