

By default, the main camera in Unity renders its view to the screen. Rendering The process of drawing graphics to the screen (or to a render texture).This section allows you to customize a range of options organized into the following groups: Follow the instructions in Using WebGL Templates. You can specify your own template so that you can run your game in a similar environment to the finished game.
UNITY WEB PLAYER ERROR CODE
The Minimal page has only the necessary boilerplate code to run the WebGL content.The Default page is a simple white page with a loading bar on a grey canvas.Select a template to use for your WebGL Project: Set the height of the WebGL canvas element.Įnable this option to allow your content to continue to run when the canvas or the browser window loses focus. Set the width of the WebGL canvas element. Resolution section for the WebGL Player platform Resolution Setting This section allows you to customize the size and style. Also, the only settings on the Splash Image panel are the common Splash Screen settings.įor more information about WebGL Publishing Settings, see the WebGL Building and Running page. Note: Although the Icon panel appears on the WebGL Player settings, there are no icon settings because WebGL games don’t use icons. You can find documentation for the properties in the following sections: For a description of the general Player settings, see Player. The Unity WebGL build option allows Unity to publish content as JavaScript programs which use HTML5 technologies and the WebGL rendering API to run Unity content in a web browser. $missingScreen.find("a").This page details the Player settings specific to the WebGL A JavaScript API that renders 2D and 3D graphics in a web browser. Var $missingScreen = jQuery(progress.targetEl).find(".missing") Īlert("You will need to restart your browser after installation.") All parameters are grouped into single params object and passed to UnityObject2 Constructor. The background color is set to light gray ( A0A0A0), border color to black ( 000000), text color to white ( FFFFFF) and loader images to MyLogo.png, MyProgressBar.png and MyProgressFrame.png. Here is an example script that customizes the appearance of the Unity Web Player loading screen. Finally, the progressframeimage and the progressbarimage should be the same height. All images must be PNG files in RGB format (without transparency) or RGBA format (with transparency) stored at eight bits per channel. The image paths provided can be either relative or absolute links. progressframeimage: The path to a custom image used to frame the progress bar during loading.Īll color values provided must be 6-digit hexadecimal colors, (eg.The progress bar is drawn beneath the logo image. The progress bar image’s width is clipped based on the amount of file loading completed, therefore it starts with a zero pixel width and animates to its original width when the loading is complete.

progressbarimage: The path to a custom image used as the progress bar during loading.logoimage: The path to a custom logo image, the logo image is drawn centered within the web player content display region during loading.The default is black or white, depending on the background color. textcolor: The color of error message text (when data file fails to load for example).bordercolor: The color of the one pixel border drawn around the web player content display region during loading, the default is white.backgroundcolor: The background color of the web player content display region during loading, the default is white.There are six optional parameters that can be passed to UnityObject, which can be used to customize the appearance of the Unity Web Player loading screen.

Please note that modifying the loader images is only possible with Unity Pro. It is possible to customize the appearance of that loading screen, including both the logo and progress bar display. By default the Unity Web Player displays a small Unity logo and a progress bar while loading web player content.
