|
How can I use the right mouse button for interactivity in a web player, or get rid of the default right-mouse button context menu? This came up recently on IRC, I thought it would be useful to have the answer archived here too.
(comments are locked)
|
|
This is possible. To do this you need to disable the context menu by editing the webplayer attributes in the HTML, as described here: http://unity3d.com/support/documentation/Manual/WebPlayerBehaviorTags.html Note! Be sure to read the bottom paragraph carefully - if you need to make any change, you have to make the same change n a number of different places within the HTML, in order to make it consistent for all browsers/platforms.
(comments are locked)
|
|
Here's a follow-on question -- I tried to apply this answer but without good success. You say in these answers "set it to true in your HTML file or application"... and here is my question:
and more importantly....
Yes, you need to add the property to the html. No, it is not possible to do this from code (though context menus are disabled when you lock the cursor in the web player).
Jan 19 '10 at 09:26 AM
jonas echterhoff ♦♦
(comments are locked)
|
|
the unity web player has a property called disableContextMenu. you should set it to true in your HTML file or application. the HTML code is something like this. if you edit the default HTML generated by unity has different sections for users with javascript enabled or not, you should edit both sections.
(comments are locked)
|
