Jump to content
Sign in to follow this  
yagero

Disable "Automatically toggle lightmapping static flag"?

Recommended Posts

Hi guys,

is it possible to disable this new feature: "Automatically toggle Detail Entity Type object's lightmapping static flag, preventing broken lightmap atlases" ?
I looked into Probuilder preferences, and I found nothing.

If it's not possible, how can I prevent Probuilder from changing my lightmapping flag? Should I set them to "Mover"?

Thanks

Share this post


Link to post
Share on other sites

That flag is only toggled off when the mesh is missing a UV2 channel, in which case having it marked as Lightmapping Static will break your baked lightmap texture.  It's automatically toggled back on as soon as a UV2 channel is present.

If you want to completely manage the static flags yourself (and accept that the lightmap will be broken when a mesh lacks UV2s) then yes, setting the object to "Mover" will prevent ProBuilder from enforcing that flag.

Share this post


Link to post
Share on other sites

Thanks Karl, I will put my objects to Mover.

FYI, I wanted the lightmapping flag off, but ProBuilder forces it on. So it's not because of the UV2 channel thing. In which cases PB can force the lightmapping flag on?

Share this post


Link to post
Share on other sites
2 hours ago, yagero said:

I wanted the lightmapping flag off, but ProBuilder forces it on

Ah, okay that's a pretty good reason to not have ProBuilder try to manage flags for you :)

The only case where ProBuilder will toggle that flag is if the object is a Detail entity type and the status of the mesh UV2 channel changes.  So marking the objects as Mover will tell ProBuilder to entirely ignore static flag management. You can also set "Mover" as your default entity type in the Preferences / ProBuilder panel to avoid having to manually mark each new object as mover. Furthermore, you could modify the "RenameNewObjects.cs" API example to set your custom static flags on newly created objects.

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  

×