Skip to main content

Common Issues - Shaders, Meshes & Textures

This page is dedicated to common issues surrounding shaders, meshes & textures. If you are experiencing an issue that does not relate to shaders or meshes or textures consider looking at one of the other pages in this section, which are also listed here.

Make sure to Update Playable!
A lot of times issues can be fixed by simply updating your plugin to the latest version, please make sure to check you are on the latest release version before looking further into this section. More info on how to do this here

Uncaught TypeError: vertex.v.color.copy is not a function#

This is likely occurring due to unsupported functionality attempting to be used in your build.

Possible solutions

  • If PopulateUIVertex() is not required for the playable, then remove the call to this line.
images-large

GetTopology error when trying to access the submesh triangle data when slicing a mesh#

This may be caused by trying to access and set submeshes from SetSubMeshes() and SubMeshDescriptor[], which aren't implemented in Luna as of now.

Possible solution:

  • You need to iterate through the SourceMesh.subMeshCount using mesh.SetIndices you can set the sub mesh topology up correctly.
mesh.subMeshCount = srcMesh.subMeshCount;
for (int i = 0; i < srcMesh.subMeshCount; ++i>)
{
mesh.SetIndices( srcMesh.GetIndices(i), MeshTopology.Triangles, i );
}

Texture Not Tiling via Shader Material#

This may be caused due to power of two textures not being able to be tiled.

Possible solution:

  • Make the texture into a power of two resolution: e.g. 512x512 or 1024x512

Cannot see textures (textures are too dark)#

This may be due to lighting being set to baked, but nothing has been baked.

Possible solution:

  • Change the light to real-time.

Texture has an unintended outline in Luna#

This may be due to the compression method used in Luna not working well with the shader.

Possible solution:

  • Disable compression for this particular texture.

Shader missing from build#

This may be due to not including the needed shader when the shader variant asset has been created in the Unity project. Or the Luna.shadervariants file was created which doesn’t included the needed shader.

Possible solution:

  • Delete the shader variant asset or Luna.shadervariants shader and see if the it gets added to the Luna build. Then re-create the shader variant file and ensure the required shader is added.
    Info on how to a create a shader variant for Luna can be found here, and info on how to create a Unity shader variant asset for Unity can be found here.
    images-small