Closed Pawlik12 closed 4 years ago
That looks like when an object it's set static and batching makes a combined mesh messes with uvs. Is this windows platform? Is there a way you can isolate this issue and instantiate the prefab in an isolated scene to test that in a build? Play mode works I assume? Last resort you could send me a repo project and I can check it
Thank you for fast reply! So I used new models and saw few things:
Also yes, this is windows build, and play mode works perfectly
Did you try to "generate lightmap uvs" from the fbx import settings? You can try there and see if it makes a difference. Also do you disable the static flag of the prefab objects after baking?
No, I don't disable it, and I used generate lightmap Uvs before, and there wasn't that much of a difference really
Disable the static flag, otherwise it will batch and mess up the uvs
Oh my god! Thank you! It fixes it! :D I'm so sorry for trouble, and again thank you!
Great 😊 no problem
Hi! Sorry I know that you closed the thread, but that's the only way I know how to contact you, hah. So my question is - do lightprobes work with lightmaps generated by your script? Or maybe should they work? Cause our first attempt made each light in scene realtime instead of baked for some reason (but that might be fault of my friend), Anyway - on every other attempt the lightprobes don't react oon our players
Lightprobes cannot be baked in prefabs due to on how they work in Unity. However there is a method to have a functionality similar to that that I am working on adding to the project in the near future
So,.. do you have any ideas how could we light our models? Lightmapped prefabs would help us a lot, cause our maps are modular anyway, and now we just have black models walking around (it's a multiplayer game so we can't really bake everything, not players deffinitelly)
Try using mixed lights, with shadowmask baking mode or similar. then your light will shine only on non-static objects not part of your prefab. To do this properly make sure to include the lights as part of the prefabs you bake
https://imgur.com/a/qXn4AOo
We are using HDRP 2019.3.10f1
Here's how ligtmaps look in build and ran in unity editor. We're aware that there was same issue a while ago but the solution doesn't work for us. Do you have any idea why is it happening, and how to solve it?