Hello, iam wondering how i can check if fullscreen is on or off in the script eks:
i need helo with the part above i dont know how the game can check if its on or off
if(screen.fullScreen = true) <<<----- this part
print(“fullscreen is on”);
print(“fullscreen is off”);
Hmm, this is another question that google would solve, if you just searched for check fullscreen Unity.
Anyway, your code is mostly correct, Look at Screen.fullScreen in the docs, then you just have to use == instead of =:
if(screen.fullScreen == true)
print("fullscreen is on");
print("fullscreen is off");
Although, here’s a pro-tip for you. If you’re ever checking to see if something
== true in an if statement, you can just put that variable.
if(Screen.fullScreen) is just a cleaner way to write
if(Screen.fullScreen == true)