Skip to main content

Invalid Luna.shadervariants asset found

Possibly a false positive
Sometimes this message can be referencing Unity's built-in shaders, which are likely not being made use of in your project. In that case you can safely ignore this message.


Invalid Luna.shadervariants asset was found.


This may be happening due to:

  • The shader target being 3.5 or higher
  • The shader is not compatible with GLES2
  • The shader is precompiled

It is recommended to consider baking shader variants used by the build as outlined in Shaders optimization tutorial.

Steps to fix

Firstly please ensure that your shader target is 3.0 or lower. You can read more about shader targets here.

Next 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. This may be due to the shader indeed not being compatible with GLES2, or the shader is precompiled. In both of these cases the shader code will need to be rewritten.

If you find that you are still experiencing a problem please have a read of our Common Issues page on Shaders.