PostprocessBuildPlayer

A Unity package file demonstrating how to use the Build Player Pipeline feature in order to provide customized build post-processing.

About

In this example a PostprocessBuildPlayer Perl script is used to provide support for a project specific web player HTML template, including the use of external supporting files.

Usage Instructions

These package files are meant to be used with an existing project of yours so please follow these steps to import the files into your project folder:

  1. Open your project in Unity
  2. Double-click the package file to import the necessary files into an Editor folder within your project
  3. Once the files have been imported simply create a web player build to see the script in action

What Will Happen

When you create a web player build after properly importing the package file the following will occur:

  1. The default HTML file created by Unity will be deleted
  2. A new HTML file will be created using the custom template found within the Editor folder (Assets/Editor/Web Player Files/Web Player Sample.html)
  3. That custom template uses a number of external files, including a JavaScript file and a few custom images, all supporting files will be copied into place next to the web player build files

Due to the above, the 'Build & Run' feature of Unity will not work properly because the Perl script deletes the originally created HTML file in order to replace it with a custom file.

Please open and inspect the PostprocessBuildPlayer Perl file for some insight into how the script works and what customized behavior it can offer.

Licensing

All assets including models, textures, sounds and scripts are available for commercial and non-commercial use when used with a Unity.

Disclaimer

Unity Technologies takes no responsibility for any harm done with the assets and scripts.