- Home /
Question by
Forux · May 14, 2017 at 08:32 AM ·
shadowsbakedlightinguv2
Unwrapping.GenerateSecondaryUVSet makes broken shadow map (Unity 5.4.4f1)
Hello,
When I use Unwrapping.GenerateSecondaryUVSet to create a map for shadows on a mesh I get problems with shadowing. Unity for some reason do not see new UV map and use an old one.
How to fix that?
I generate UV2 with next code
Mesh mesh = meshFs[i].sharedMesh;
Unwrapping.GenerateSecondaryUVSet (mesh);
EditorSceneManager.MarkSceneDirty(currentScene);
EditorSceneManager.SaveScene (currentScene);
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612121957im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Shadow's quality bug? Or just wrong settings? 1 Answer
Pre baked shadows in Unity 5?? 1 Answer
How to turn off a baked shadow 0 Answers
soft shadow after bake 0 Answers
How to turn off a baked shadow 1 Answer