HoweScape Unity3d WebGL
The Unity3d WebGL support creates a directory of files. This is not convent to load on your WordPress web site. This plugin takes the contents of the “Build” directory (“Release” in earlier versions) from your game and places it inside the plugin. When compiling the game you need to select an output
The Unity3d WebGL support creates a directory of files. This is not convent to load on your WordPress web site. This plugin takes the contents of the “Build” directory (“Release” in earlier versions) from your game and places it inside the plugin. When compiling the game you need to select an output directory. This directory name becomes the name of the game. In the initial version of the plugin for version 5.3.1 the plugin required “Builds_WebGL” to be the game name. The short code created by the plugin takes parameters which allow selection of the game. This plugin can then be referenced from with a short code. The parameters in the short code are the game name and the width and height.
ie. [hs_unity3d_web_gl_game src=”Roll-A-Ball” height=”500″ width=”600″ u3dver=”2020.3″ buildtype=”Production” ]
To extend the support for Unity3d to version 5.5.1 an additional parameter has been added. This parameter allows the specification of a version. The version support is 5.5.1 or the original version supported by the plugin. (ie. original version 5.3.1) The Unity3d version 5.5.1. creates a directory “Development”. This is what I have uploaded in the included example. (ie. Roll-A-Ball-5_5_1-Release) The short code is now looks like the following example.
ie. [hs_unity3d_web_gl_game src=”Roll-A-Ball” height=”500″ width=”600″ u3dver=”5.5.1″ buildtype=”Production”]
In reviewing the latest verion of Unity3d I noticed that the file organization for the WebGL has been updated again. With this update there are now 7 supported version 5.3.1, 5.5.1, 5.6.0, 2017.4.0f1, 2018.4, 2019.4, 2020.3 and 2021.3.9f1. When using the newest version you would have a short code like the following.
ie. [hs_unity3d_web_gl_game src=”Roll-a-ball” height=”500″ width=”600″ u3dver=”2019.4″ buildtype=”Production”]
With the latest update to WordPress 5.7 the format of the files has changed agaion. The WebGL build options include the choice of a “Development Build”. While this options is not recommended for a published game, being able to use in the plugin would helpful. An additional parameter has been added to specify the build type.
ie. [hs_unity3d_web_gl_game src=”Roll-a-ball” height=”900″ width=”900″ u3dver=”2020.3″ buildtype=”Development”]
This feature has four supported values “Development”, “Production”, “Production.GZip”, or “Production.Brotli”. The parameter is not necessary, if you are using a production build using GZip compression. The player settings Compression Format has 3 possible values. * Development – No compression * Production – Same as Production.GZip * Production.GZip – Same as Production * Production.Brotli – Compressed with a different algorithm These values allow you to take advantage of all the possible combinitation.