Skip to main content

Export failures

Apart from code compilation errors, which can happen due to missing APIs or simple mistakes in the code, Unity Playworks Plugin can also fail exporting your project at different stages for several reasons. This page outlines common error messages that can appear during export and steps to take to resolve these errors.

Assets processing failed

caution

Detailed build logs are saved to a local file in Project > LunaTemp> luna.log. Please review this file if your experience asset export failures.

This message appears whenever Luna's asset pipeline is unable to digest some of the assets properly. This could happen in one of four instances:

MSBuild failed

The most likely cause for this error is MSBuild not being found in the system or configuration having an invalid path to it. Please make sure you have MSBuild (along with .NET 4.7+) installed on your machine.

Invalid custom script

If the project has custom processing scripts configured (i.e. to resize a texture or compress an audio clip), and this popup appears during export, it is recommended to first try disabling those scripts. If the scripts don't write a proper output file, exit with non-zero status or crash the export process, Unity Playworks Plugin will have to stop and display this message.

Editor script error

This message will appear if there is an Editor script clashing with Unity Playworks Plugin export in some way. If that is the case, Unity's console will contain an error message with a stack trace; inspecting this should point to the script(s) causing problems. The way to resolve that would be removing the script in question or fixing it so that it does not interfere with the export process.

Unwanted Scenes left in Unity Build settings

If you have scenes you don't want to export in Unity Playworks Plugin added to your Unity build settings, it could be causing your build to fail. To get around this simply remove all scenes you aren't exporting with Unity Playworks Plugin from your Unity build settings, even if they aren't currently checked to be in the load order.

images-large

A bug in Luna

Although the whole export process contains an excessive amount of safety nets and fall-backs, it can be the case when there is a bug in Unity Playworks Plugin that prevents the assets from being exported. Similar to the previous scenario, Unity's console would contain an error message with a stack trace originating from Luna's editor scripts namespace. If that happens, please contact us for further assistance.

PNGQuant Access Restriction

When starting a Unity Playworks Plugin build for the first time you might encounter a permission requirement when building your Unity Playworks Plugin build. This is to do with quant conversion which is actually done by calling executable build into the package. In the case of Mac all (image) conversion will ask for permissions, quant being a case.

Steps to Enable Permissions

• Open terminal and navigate into Playworks Plugin package you downloaded, where ever the package lives on your local machine.

• Then navigate into the tools directory.

• Once in the tools directory is open, you can enter: chmod 777 pngquant

This should enable you to build without compilation restrictions.

If the above didn't work, it could be due to the directory requiring permission further inside the directory folder. Check the contents of that directory with the ls command in the terminal, inside Playworks Plugin package tools directory.

If pngquant folders are present then move into those folders using the commands below:

cd pngquant

depending on your device :

cd mac64

or

cd win64

Once at this level you should enter: chmod 777 pngquant once again.

Incorrect Stubs folder pathing

If you are collaborating on a Playable and making use of our automatic stubbing feature the pathing may still be set to another collaborator's machine.

To fix this locate the Stubs folder in the project directory, and paste the correct path into the 'External C# sources folders' box (Plugin UI -> Code -> External Sources).

images-large

Assets (Package) bundling failed

While these messages may be caused by external factors like lack of disk space or a third-party software terminating Unity Playworks Plugin process, the most probable reason is some kind of a bug inside Unity Playworks Plugin internals. Please don't hesitate to contact us in this case.

GUI/Text Shader Error

If you are experiencing an error like this in Unity when exporting to Unity Playworks:

images-large

You most likely can ignore it.

This error is due to the default shader for immediate GUI being automatically grabbed & exported, however its been exported incorrectly. As its inclusion is automatic, no matter if it is used or not, most cases of this error the shader was never being used at all.

In the likely instance you arent using this shader, your project will be unaffected and you can safely ignore this error.

In the future we will be moving this message to appear only in the Unity Playworks Plugin Window.

Object(s) Not Appearing in Unity Playworks Plugin build

If your object is appearing in Unity but not in your Unity Playworks Plugin build, it will most likely be due to one or more of these reasons:

The Unity Playworks Plugin build has not been Updated/Rebuilt

Click 'Build Develop' again in the Plugin window.

The Disable Cache option in your browser is not enabled

info

With Playworks Plugin 3.8.0 and above, the local web server within Unity will no longer use cache.

Tick the option in the browser inspector, under the Network tab:

images-large

Incorrect Scene Selected in Plugin Export Settings

You can check your selected scene in the Unity Playworks Plugin window:

images-large

AABB of object is incorrect

Check result of culling. You can do this with BabylonJS Spector. If the object was in the array for rendering, but not after culling: Then something is wrong with the culling, or the objects data for culling.

Object Mesh is Empty

This may be due to the mesh or sprite asset being excluded.

Object's Shader is Empty, or Excluded

Check object in the inspector to see if it empty, and check your Unity Playworks Plugin Exclusions tab to see if the shader is excluded:

images-large

No Shader Variants Exported for your Shader Keywords Combination

First thing to check is if GLES20 is on in the shader compile setting: Select the shader asset, in the inspector select the drop-down arrow next to the 'Compile and show code' button. Select 'GLES20' from this list. After this hit the 'Compile and show code' button itself, which will allow you to see the see the compiled version of the shader for every keyword combination.

If there is nothing there, or it is showing the incorrect shader, we won't be able to grab it. Possible issues causing this could be:

  • The shader is incompatible with GLES2, in which case the shader code will need to be rewritten.
  • You're using a Precompiled Shader, which are not currently supported. (List of current limitations here)
  • You have created a Shader Variant Collection where some of the keywords are not being picked up.

Vertex colors of mesh are 0

The drawcall is happening, but the object is completely transparent. Check the drawCall.mesh.vertexBuffer data.

Duplicate Sprite draw orders

You can get around this by setting the Sprite layers specifically.