I am Trying to add a anything But in JavaScript
I Know The Above Title is a bit Confusing but What I'm Looking for is Something like this
function Update () { if (Screen.fullScreen <> !Screen.fullScreen){ Screen.fullScreen = !Screen.fullScreen;
} }
I need to tell if my game is not Full Screen then make it Full Screen And i am not sure about how to do that. I Know that in .net i would use <>. any help would be Nice and Thank you
Answer by jgodfrey · May 20, 2016 at 01:23 AM
You should be able to make the game full-screen if it's not already using something like:
if (!Screen.fullScreen) { Screen.fullScreen = true; }
Though, it shouldn't hurt to simply set it to full-screen regardless of what mode it's currently in. To do that, just drop the "if".
Screen.fullScreen = true;
It Worked Thanks if anyone else decides to use it you will need to change the S in the First Full Screen
Glad it worked, and sorry for the typo. I've edited the original answer to fix it...
Your answer
![](https://koobas.hobune.stream/wayback/20220612081151im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
how to make a gameobject be positioned according to screen (on edge of screen)? 1 Answer
Issue switching between full screen and windowed 0 Answers
Why my Screen.fullScreen isn't working? 1 Answer
How can I rate the game on different screen resolutions? 0 Answers
Switch to maximized window at runtime 0 Answers