About admin

  • Website: or email
  • Biography:

Posts by admin:


Full browser WebGL templates with CSS

On July 12, 2015 in Unity3d, webgl

There is a number of layout options for embedding the WebGL player in an HTML page now. Unity gets shipped with two standard WebGL templates and custom templates feature. This is an update to my previous post here.

The standard templates include the default and the minimal template.
The minimal template comes only with the minimal files for runnung the WebGL player only and doesn’t provide any output for the loading time. During the build process the minimal template generates the .htaccess and index files together with the Release/ and Compressed/ data folders inside the build folder.
The default template also adds a TemplateData/ folder with the UnityProgress.js file in it. On loading the webpage the UnityProgress.js generates and adds the loading elements to the parent node of the canvas element in the index document and then uses them to visualise the loading progress.

I came across a very interesting blog post here. The most important I have learned from it is that all the resizing can be done purely with css so there is no need of any javascript for canvas size initial setup or onResize action.
I started from the default template and then forked it a bit, getting three new templates:

  • full browser window flexible
  • full window flexible & footer
  • full window flexible & sidebar

full browser window flexible template

full window flexible & footer template

full window flexible & sidebar template


Comparing to the default template – in the full browser flexible template I have given up the canvas background element and styled the page backrgound instead, because they have the same size. Then I will be able to easily pass on the styling data with the $_GET or $_POST to the index.php file.

I found this very useful for one of my projects where I have one common loading scene and over a hundread of target scenes loaded from AssetBundles. Then I pass the url of requested scene bundle as an argument to the index.php file.  Now I can use the same argument to set the loading screen background.

The loading process has a data downloading phase which is illustrated by a progress bar and then follows a data processing phase, when – in the default template – user is being made to wait and nothing is happening. In all these templates I have added an animated gif for that.

These templates are ready for download inside unityPackage below:



Unity3d WebGL player vs WebPlayer – comparison experiment

On January 7, 2015 in Unity3d, webgl

Here is a simple comparison between Unity WebPlayer and WebGL player builds generated from the same project. The project is just a quite complex christmas tree scene which just fits to the current season of the year. I have placed the WebGL player page inside the iframe below. You can replace it with Unity Webplayer […]


Full browser WebGL unity3d template

On January 1, 2015 in Unity3d, webgl

The Unity 5 WebGL player build pipeline – as of time of writing this – comes with one embedding layout option only, and lacks template customizaton options acompannying the webplayer pipeline. In order to add some customization to that you have just to modify the automatically generated index.html file. (Now you can skip reading this […]


Day/night switch – unity3d lightmaps switching made simple and easy

On July 10, 2014 in Unity3d

I have recently made a research on day/night cycle Unity assets. There are plenty of them both commercial and free. The most interesting and advanced one can be seen on this demo: http://youtu.be/YWLBMqY2SRQ. https://www.assetstore.unity3d.com/en/#!/content/5674 and one of the free ones based on runtime shadows and skybox transitions can be found here: http://www.galawana.com/unity3d-day-night-cycle-and-transition/ However there were […]


Crossection/clipping tool

On July 7, 2014 in Unity3d

Here is a crossection/clipping tool I got published on the AssetStore some time ago. The tool operates on a collection of crosssection shaders which are the counterparts of selected basic Unity3d built-in shaders . The shaders on the object materials get substituted with these shaders and the user can manipulate the shader’s parameters moving the […]


Branched tubework editor

On July 4, 2014 in Unity3d

This is a demo I made in Unity3d for a purpose of the testing of fluid flow in human organs. A simple tool for creating the geometry was needed. The demo tool I came up with  is capable of saving the files  in the common 3d formats like .obj or .dae  and also outputting it […]


Simple mesh sculptor

On July 2, 2014 in Unity3d

This are just a few of assets and two demo scenes looking like a further development of the “Sculpt vertices” scene from Procedural Examples asset from Unity Tech demos. I have just added some tool options and tool gizmo and one step undo function. The tool – object interaction is based on the mesh collider […]


Playing with shaders – isolines

On December 23, 2013 in Unity3d

World space isolines shader The shaders in Unity still remain a myth for me. But when I have a goal, I would find a way to make it by modifying already existing ones, basing on the resources in the web. This time I targeted myself at getting an isolines shader. Its demo is here. There […]


LOD management demo

On February 13, 2013 in Unity3d

This is a simple lod testing example. It is based on Unity3d v.4 Pro buit-in LODGroups and the runtime access to that. I was just making an automated tool for the creation of the big LOD based scenes from thousands of mesh pieces and just needed an experimental way to determine the LOD ranges to […]


Tweened animation

On February 10, 2013 in Unity3d

There are a few animation tween plugins for Unity. The most popular are iTween and HOTween. The first that has appeared was iTween and I have chosen that one to use in this experiment. All the movable scene objects are groupped into the categories and attached to the array of lists in the animation script. […]


An artistic 3d vision of faculty logo

On February 2, 2013 in Unity3d

I got recently asked by a friend to create a 3d vision of Faculty of Physics at AGH University of Science and Technology in Krakow, PL to be laser engraved  inside a glass cuboid. This is just an artistic form of the boron atom. It has to be artistic and as close as possible to […]


Fluid WebPlayer html ebedding templates

On June 15, 2012 in Unity3d

The most common fluid layout for embedding the Unity3d WebPlayer is the full browser window one. However to enable some user – browser communication and user data  uploads I needed other ones with constant size elements to display info, links and data upload forms. I have used javascript to calculate and set the styles properties […]


A PlayerPrefs/mysql texture management for the Unity3d WebPlayer

On April 22, 2012 in mysql, Unity3d

In this experiment I have created a simple two level edition system for online edits of the WebPlayer content. The specially tagged geometry elements have a script attached, which displays a name label on hovering upon them. Clicking on them invokes the texture menu, which depends on number and  kind of materials. There are two […]


Upload your texture to Unity and roll it

On February 3, 2012 in Unity3d

This tiny Unity3d application could be aimed to help the people to imagine how the flat graphic would look when printed on a coffe mug, pencil or anything cylindric. There is a square mesh in the window centre and you can put any .jpg, or .png texture up to 4 Mb from your local filesystem […]

Copyright © 2011-2017 virtualPlayground All rights reserved.
VP based on Desk Mess Mirrored v1.8.3 theme from BuyNowShop.com.