I am seeing this error when I create a meshbuilder and also when I save the curve as a game object
Primary UV set on CurvyMesh is incorrect and the secondary UV set is missing. Lightmapper needs UVs inside the [0,1]x[0,1] range. Skipping this mesh...
Choose the 'Generate Lightmap UVs' option in the Mesh Import Settings or provide proper UVs for lightmapping from your 3D modelling app.
UnityEditor.DockArea:OnGUI()
As a result I cannot get the curv object to receive any shadows when lightmapping.
To add the UV2, please edit SplinePathMeshBuilder.cs, in Refresh() add a line "mMesh.uv2 = new Vector2[mVerts.Length];" right after "mMesh.uv=mUV;" - that should do the trick.
If the UV's are beyond 0:1 you've scaled the material, right?
02-20-2015, 09:18 AM (This post was last modified: 02-20-2015, 09:22 AM by master71.)
Thanks Jake,
Unfortunately it did not seem to work, as it led to darker outputs on the Curvy Meshes and still no shadows unfortunately.
If the UV's are beyond 0:1 you've scaled the material, right?
Well, all I did was set the UVMode to Absolute so I could get some blue stripes on the road,
To illustrate the problem, I have attached two screenshots (real-time and lightmapped), and on each I have two sets of roads/paths - on the left is with the additional line of code and on the right is without it. I have also put in a Unity cube across the scene to make sure it can capture the shadows which is does manage to do.