Jump to content
Sign in to follow this  
Trevir

Lightmap breaks on game run.

Recommended Posts

Hello! I am having issues with my lightmapping with Probuilder. The initial bake is fine, but when I run the game the map 'breaks' (see attached image). Only after modifying the Probuilder model and then undoing the newly preformed change will the lightmap fix itself, but this is only a temporary fix. After the game is stopped,the next time the game is run the lightmap breaks again. I cannot seem to find a permanent fix to this. Ive tried reimporting Probuilder and creating a new project, and neither have worked.

 

Probuilder 2.6.2f0

Unity 5.3.0f3

Windows 10

post-1590-0-02220500-1473033231_thumb.png

Share this post


Link to post
Share on other sites

Is there any change the mesh is being accessed at run-time?  My thought being that maybe the static mesh is being modified on build or at play time, resetting the UV2.

 

Not that I know of. How would I be able to check, as the UV2 seems to stay intact in the UV editor

 

EDIT: looking in the UV editor after deselecting the object and reselecting it now shows an absence of the UV2. The UV2 is being reset on runtime.

Share this post


Link to post
Share on other sites

Okay.  Do you have Auto UV2 Generation on or off (you can check in the settings window of the Generate UV2 button)?

Sorry, but I cant seem to find such a window or a way to open it. How do I locate it?

 

EDIT: Ah its the main preference window. Sorry about that. Ive checked 'Disable Auto UV2 Generation' on, but the breaking still occurs.

Share this post


Link to post
Share on other sites

In the ProBuilder toolbar, do you have a button for "Generate UV2"?  With an object selected, click the "+" icon to show the settings (or Alt+Click if you're in Icon mode).  In that settings window, check the toggle for "Generate Scene UVs" then hit the "Generate UV2s" button in that window.  You'll probably have to re-bake the scene at this step.  When finished, run the game.

Share this post


Link to post
Share on other sites

In the ProBuilder toolbar, do you have a button for "Generate UV2"?  With an object selected, click the "+" icon to show the settings (or Alt+Click if you're in Icon mode).  In that settings window, check the toggle for "Generate Scene UVs" then hit the "Generate UV2s" button in that window.  You'll probably have to re-bake the scene at this step.  When finished, run the game.

 

I tried that, but it didn't work. I did find the problem though. I tried resetting all probuilder preferences, and the problem no longer occurs. Thanks for your help!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×