- Home /
Question by
Mastertrol · Jun 17, 2014 at 11:41 PM ·
fullscreen
FullScreen Mode Help
I Know there is a Player Settings and in there you can select Fullscreen by default however for some reason this is not working. I want a game that plays in fullscreen mode only so I need a script that checks if the user is in fullscreen mode or not and if not change it to fullscreen mode pls help
Comment
Answer by Rhithik · Jun 18, 2014 at 01:04 AM
A simple call to this will help you out.
http://docs.unity3d.com/ScriptReference/Screen-fullScreen.html
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Example() {
if(!Screen.fullScreen) {
Screen.fullScreen = !Screen.fullScreen;
}
}
}
For some reason, Screen.fullScreen only removes the border. It does not move the picture to the upper left corner, so I have a large, borderless window in the middle of the screen. Any ideas?
Your answer
![](https://koobas.hobune.stream/wayback/20220613151812im_/https://answers.unity.com/themes/thub/images/avi.jpg)