- Home /
Web Player Javascript Documentation
I really looked everywhere but can't seem to find a documentation about all the Javascript Webbroser functions, i.e. GetUnity().
I am sorry to bother you guys, I am able to dig up god knows what with searchengines but I am at my wits end in this case.
Answer by DaveA · Jan 11, 2011 at 12:21 AM
I think GetUnity() is defined right in the html itself, it's not like an API function or anything. Everything I've needed is here: http://unity3d.com/support/documentation/Manual/Unity%20Web%20Player%20and%20browser%20communication.html
I guess, I did misunderstand something, but the mainproblem is, that getObjectById() returns an object inside the by calling GetUnity(), and this Object seems to have some certain methods and $$anonymous$$embers which I'd love to find an overiew for. there should be something like "ReturnedObject.style.Height()" And I need info about these methods and any Fields that there are.
Ah yes. You can poke at the DO$$anonymous$$ in a debugger to see such things, yet what are they? Good question. I would think most of them are 'standard', curious what custom methods they have...
Answer by Thelo · Feb 22, 2011 at 03:34 AM
GetUnity() returns a DOM element which is either an <object> or an <embed>.
Here are the standard members that all DOM elements share:
http://www.w3schools.com/jsref/dom_obj_all.asp
Here are the members specific to <object>:
http://www.w3schools.com/jsref/dom_obj_object.asp
<embed> is not a standard DOM element, but it will at least support the standard DOM elements' members.
Your answer
Follow this Question
Related Questions
Concerns about browser security due to making javascript calls to game from browser. 1 Answer
Webplayer requires multi-click to star? 1 Answer
Problem with UnityObject2.SendMessage | communicating with the web player 0 Answers
Detecting Webplayer's errors from Javascript 0 Answers
Install unity web player from flash 2 Answers