- Home /
Full screen not working from html message
Hi, I'm trying to enable a button out of my Unity webplayer object to active the full screen size. The function it's working because I've tested it with an internal button, but the call is not working. What I'm doing wrong?
html file button call:
jQuery("#btn_full").click(function()
{
var myValueInUnity = u.getUnity().SendMessage("GameManager" "SwitchFullScreen","");
alert("response: "+myValueInUnity);
});
C# class:
public class GameManager : MonoBehaviourSingletonPersistent<GameManager> {
public void SwitchFullScreen(string emptyS)
{
//Do Something
}
}
Thank you.
Edit: the button works because I'm able to see the alert: "response: undefined"
Edit2: Now I know why. Full screen mode just can be enable in the webplayer after clicking on the content. So, if the unity webplayer object is not focus this won't work. It's annoying what this button in all the screen so ... how can I cheat Unity?
Your answer
Follow this Question
Related Questions
unityObject is null 2 Answers
godaddy webgame problem 1 Answer
unity3d webplayer doesn`t work 1 Answer
I have a big project building for webplayer. Is there any browser to run it yet ? 3 Answers
change player possition via url 0 Answers