Optimising Meshes
Unity Playworks Plugin exports vertex data from meshes as float
numbers to keep it as precise as possible to the original art. The data is stored in binary format, which allows for efficient uploading to GPU, reduction of startup time and the consumption of no additional memory which text formats are prone to.
However, mesh geometry might occupy considerable amount of wire size, especially when high-fidelity meshes are involved. In many cases, the only optimization tip available would be "ask artists to reduce the number of vertices", but this can be rather time-consuming and inefficient. Therefore, Unity Playworks Plugin provides an optional mesh precision reduction feature.
Let's start by navigating to the Assets section and the Meshes tab in Plugin UI:
The highlighted part of the screenshot above is the section that describes parameters applied to exported sounds by default.
Store mesh in Half-precision floating-point format
This will instruct Unity Playworks Plugin to use half-precision float
s for storing mesh data, reducing the size taken by 50%. It is almost impossible to predict whether it is going to be noticeable in the final product, but in many cases the difference will be negligable. These float
s still have 3 precision digits, which is enough for many cases. The only parts of the mesh that get really affected are positions and blend weights; other parts like colors, normals, tangents, UVs and so on are usually represented well enough even with less precision.
WebGL 1.0 doesn't support half-precision vertex format, thus Unity Playworks Plugin has to unpack the data into single-precision float numbers before sending the data onto video card. Depending on the overall mesh size and device power, the lag can be noticeable, so please test carefully before enabling it for production builds.
Per-mesh settings
All of the above settings are also available on a per-folder and per-mesh level. Developers can choose a folder of a file by ticking a checkbox in "Per-mesh settings" section of the window and use the same fields to tweak parameters of a specific mesh(s):
Mesh Import Settings - Mesh Compression
Under the Mesh Import Settings of you meshes in Unity, setting the Mesh Compression setting to 'High' can save large amounts of space.
In most cases the impact to quality is not noticeable, but be sure to check after applying this setting in case it is in your case. If so, you may choose to lower the level of compression in the setting until it looks right.
Mesh Combiner Unity Plugin
Mesh Combiner is a free plugin, downloadable from the Unity asset store - click here to download.
This tool allows you to combine meshes which can reduce draw calls (improve performance) and also reduce the size of your playable!
For more information on how to use the Mesh Combiner plugin, checkout the description provided on the download page, or alternatively you can watch the tutorial video the creator has made on YouTube.
(This video is also available for viewing on the download page)