Fullscreen message

Hi,

I used the following code to put a botton that switch
beetwen fullscreen activate/desactivate:

///////////////////////////////////////////
using UnityEngine;
using System.Collections;

public class clicFullscreen : MonoBehaviour {
void OnGUI () {
if (GUI.Button(new Rect((Screen.width - 64),4,60,20), “fullscreen”)) {
Screen.fullScreen = !Screen.fullScreen;
}
}
}
///////////////////////////////////////////

And it works perfectly, but the player show the following message:
“Clic ESC to exit fullscreen”

Someone know how I can change this message?
I need to put another message in spanish.

:shock: Thanks!

The message is a security feature to make sure that the user’s desktop/login screen can’t be spoofed. As such, being changeable would defeat its purpose. However, adding a selectable message (including different languages) would be a worthwhile feature request… :slight_smile:

The message doesn’t stick around very long. Why is it good? I don’t understand what StarManta is saying by “spoofed”.

I have a button on-screen to exit from fullscreen, so this message becomes clutter.

To spoof something is to create a fake version and use it to fool the user into letting you do something that you shouldn’t. Thus I can spoof your email address to send something naughty to your boss and get you in trouble. Worse, about 100,000 jerks try to spoof E-Bay or Paypal every day to get people to “change” their password – but they end up just giving it to the bad guys without knowing because the site has been spoofed/faked.

That message is there to let the user know that Unity has taken over the screen so everything that appears is doing so under Unity’s control and not the OS’s. This means some less-than-honest person couldn’t use Unity to display a fake desktop with some error message and a Password box asking for the system password. “To continue this operation, the system must first be optimized. Enter the system password below to continue…” or something similar.

Spoof’ing rarely ever works on computer-savvy people but it fools so many of the more helpless users that a built-in safeguard is a respectable solution.

Having said that, adding a set of localized strings for use in different countries and/or languages is a really great idea.

Cheers.

Hoji.

Thanks for the explanation. I figured that’s what was meant, but I had never seen that term used before in that context.

I’m not sure that this short-lived message is going to help anyone, but at least it doesn’t last long.

Hmm, I’ve treid it with this code:

function OnGUI()
{
	if (GUI.Button(new Rect((Screen.width - 80),4,80,20), "fullscreen")) 
	{
		Screen.SetResolution( Screen.currentResolution.width, Screen.currentResolution.height, true, 0 );
		print ("1---" + Screen.currentResolution);
	}
	
	else
	{
		Screen.SetResolution (400, 400, false, 0);
		print ("2---" + Screen.currentResolution);
	}
}

Did this run in the GameView in unity?
Or only in the web player / standalone?

There is no change to realize except for the console outputes.

That code is currently broken when using Internet Explorer (if you’re using OnGUI, that is). I actually haven’t tried it using a standalone build.

http://forum.unity3d.com/viewtopic.php?t=9208&highlight=fullscreen

would i choice another language instead the message “Clic ESC to exit fullscreen”, because not everybody can speek in english