Customizing the Unity Web Player's Behavior

The Unity Web Player allows developers to use a few optional parameters to easily control its behavior in a few ways:

Here is an example script that limits the behavior of the Unity Web Player, the context menu will not be shown. Although there is only one parameter it still must be placed inside params object and passed to unityObject.embedUnity method.

var params = {
	disableContextMenu: true
};

unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 600, 450, params);

In the above example you'll notice that neither disableExternalCall nor disableFullscreen are specified, therefore their default values are used.

Page last updated: 2012-10-12