I'm working on an application targeting both the web and standalone, it's important to me to get a consistent user experience on both platforms.
I'm using the following script to toggle between fullscreen and windowed mode, which is activated by clicking on a custom gui widget in the top right corner of the screen.
Are there any params I can give to the unity web player to make it disable the "Press esc" message? I've got no problem with the "esc" from fullscreen function (in addition to my own toggle), I just don't want that message showing up in the webplayer, since it doesn't in the standalone client.
No, that message is a security feature to prevent fullscreen unity web players from being used for phising and the like.
There is no way to prevent it showing up.
It's a real shame, but it's just one of the things you have to factor in when developing for the web.
Mathematicians that only do calculations that we already know about and are comfortable with? They're called accountants, and they have no friends.
I never got word back about the bug I was having, so check to make sure everything is working ok for you in Internet Explorer. I tried all the options for a "come back from fullscreen" button, and none of them gave me proper results (other than the Esc key).
Is it possible to use OTHER key than the esc key? because esc key usually bring out the pause menu or other types of menu and when in fullscreen it get inconsistent.
I agree and understand on the issue of phishin and that the dialog its a must have, but can we redefine that esc key to something else? and have that appear in the dialog?
CEO - Minor Studios Argentina.
No, and it's not likely something that we're going to implement either (sorry for the gruff reply I'm just being honest about the state of affairs). So you'll have to find another key to use in your games for menus and the like as escape is reserved for exiting full-screen as well as unlocking cursor-lock/hide.Originally Posted by mrepettoIs it possible to use OTHER key than the esc key?
For the record, we are not asking to remove the functionality of having some "hardcoded" key for leaving fullscreen nor even take that dialog out, I think it has to be there and you guys are right, what we need is the ability to redefine that "esc" key, because as you may be aware, is usually the pause in many many games, also is intuitive when you are playing . We could then redefine CONTROL+ESC to leave fullscreen or ALT+ESC or you what have you, and that new info should appear in the hardcoded fullscreen dialog for the user to know.
Hi there HiggyB,
The main problem that we have is that our game brings out the pause menu in window mode, and when in fullscreen, you want to pause and you are being taked out of fullscreen and then paused its really annoying and the game experience gets "corrupted". There are several other web browser big games out there with the same problem that reached a solution by using the esc key for menu. Shiva has an FPS example that shows this, also quake live has the same behavior than us and they use the esc bringing the pause menu and to leave fullscreen you just quit the game.
I've also see the point you've mention in fullscreen plugins for casual games, being the esc a default to get out of fullscreen (flash games and the like) but we are pushing the limits of unity trying to do something unique and big, and this really affects the experience. I will submit a request to feedback but I am guessing we will have no answer, not in the short term tho, and we are about to launch.
Sorry for the gruff comment as well, but I think that not allowing us to redefine the esc key is a step in the wrong direction as many games in the browser are getting more big and potentially hardcore, and in PC gaming history the esc key was usually used for the pause menu. I know that the "browser" its a different story, but right now we are seeing more and more that the browser is just another vehicle to get desktop like content with desktop like features and functionality.
btw: we have a workaround that is indeed not pretty at all, but it does the trick.
CEO - Minor Studios Argentina.
I agree, Esc could be used for removing mouse focus from the application, but F11 is much more cleaner option for fullscreen.
Most of the gamers are used to the Esc key in the "Show me the menu" scenario, and it could be pretty troublesome. Switching that functionality in full screen to the F11 key ( used for switching the browsers fullscreen state ) would prove only as a plus.
Atop of that if someone is trying to create a full screen that could not be stopped there are a few workarounds that work decently well, which acutally makes sticking to the Escape key pretty redundant.
for normal games that true about esc. normal game means standalone
but for web stuff, ESC is defacto the standard for "exit into default state", especially exit from fullscreen, that includes movie players as well as flash in general.
You can decide to not like it if you want, but then you won't develop for web.
After all what the key esc, for those who have forgotten it also known as ESCAPE, is about and has always been about.
desktop games just use the exit in a different context than the rest
Okay, fair enough.
If it can not be set from developers side, there is an option that could satisfy all sides.
Leave the Escape key as it is. Just add a box in the Unity3d setup ( http://cdn2.unity3d.com/setup-3.x/ ) for the user himself to chose the most efficient key for himself, and with Escape the default option.
Slick, clean everyone is happy.
No, not everyone.
Users of web applications are used to ESC for leaving fullscreen, thats the standard.
So its not open to debate if that is going to work like that or not. Its just like that, just cause a few unity devs think that cheap desktop to web ports would "benefit from breaking the standard" it won't happen.
You have the option to get corresponding buttons on the screen if you want to show a menu without a different button or use P as it used to be in games before the ESC missuse started (cause P is the by far most logical key for it due to Pause). That being said not even today ESC is consistent, some use it to get into pause, others to get out of the menues back into the game and stuff like that. Something between laughable and just stupid to not have it exiting to one designated state and point (ie escape to the 'exit point' for what the key was meant)
If you want to let the user configure an additional key to get out of the fullscreen, then thats open to debate naturally, but does not require any unity addition as you already can do that.
I didn't meant letting the user remap the Escape key.
My scenario example:
Anyway I have the feeling that noone even considers giving the USER the ability to choose what suits himself and leaving the default option the Escape.User plays a game.
User has a complaint - he wants to use the escape key differently.
He goes to the ingame menu and makes the escape key do something else, for example "Jump".
But the escape key still makes the application lose focus in addition to "Jump".
The user gets to the unity setup page and with a couple of simple clicks sets his "Escape focus/fullscreen Escape Key" to something else.
This is the second time I see someone using the excuse that Unity can`t let programmers disable the Press Esc for security reasons.
I have a suggestion to solve that problem. Could you give us the option to select the language of that message? I am doing a facebook game, and all texts are in Portuguese, except that annoying message in English. That is a major interface BUG.
Come on guys, lets fix this thing!
Last edited by omaclouly; 10-05-2011 at 07:12 AM.
I know this issue isn't going to be changed any time soon. However, that doesn't mean that it should be hard-coded into the engine, preventing the developer from being able to create their game in the way that they choose to.
When you are trying to target a population of stand-alone players, like I am, it is a good thing to replicate that play style onto the web player as well. By hard-coding this "feature" into the engine, it prevents developers from trying to make things easier for their target audience.
Sure, we can hackishly work around it... but why force us to do hackish things?
I agree with GRIM. Usually the default for getting the browser off fullscreen is F11 and if it's clearly stated, as the escape key currently is - it should not be much of a change for the users, nor a giant pitfall of doom where users would not be able to exit the application.
This goes for any key used.