Fullscreen toggle always true for some reason
I have a toggle UI for toggling fullscreen and in my UIManager script I have the following code
private void Start() {
fullscreenToggle.onValueChanged.AddListener(delegate { OnFullscreenToggle(); });
}
public void OnFullscreenToggle() {
OptionsData.fullscreen = fullscreenToggle.isOn;
Screen.fullScreen = OptionsData.fullscreen;
}
OptionsData.fullscreen
is toggled between true and false correctly however Screen.fullscreen
is always true not matter what. I did previously set the Listener directly in the editor with the dynamic bool for the function but that didn't work either and I have no idea why Screen.fullscreen
is always true even if OptionsData.fullscreen
is false.
Can someone please help me find the solution?
Answer by HyperOwl · Jul 27, 2018 at 04:54 AM
Had this same issue today. Try reseting the player settings by going into build, player settings, and right clicking the little slider icon and hitting reset.
I tried it but the issue still persists :( Thanks for trying to help though!