x


Getting focus on web player

Hey guys, I'm currently working on a keyboard-based game wtih HTML UIs.
Basically, there is no button or something requires a click inside the unity.
Since my game is keyboard-based, I need some kind of way to acquire focus from web page.
You know, if you don't click on the unity web player, focus is still on the web page
and that means keyboard input will not be delivered to the web player unless user click on it.

What exactly I need is that, get keyboard inputs when page is loaded. So, here is what I'm asking.
1. Is there any way to acquire focus from unity side?
2. Or can I intercept all the inputs on a web page from unity side?
3. For the last shot, can I render html and javascript on unity web player?

Hope there's someone who can help me out.
Thanks.

more ▼

asked Aug 27 '11 at 04:32 AM

chidoli gravatar image

chidoli
41 3 8 10

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Replying to your old question: Unity Web Player and browser communication. And no, you cannot overlay HTML elements on top of a Unity area.

Concerning the focus question, you have to tell the player to click inside the area.

more ▼

answered Mar 24 '12 at 03:34 PM

Dakwamine gravatar image

Dakwamine
549 4 7 12

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x830
x215
x65
x13
x13

asked: Aug 27 '11 at 04:32 AM

Seen: 1361 times

Last Updated: Mar 24 '12 at 03:34 PM