I have a couple of models that, try as I might, I cannot turn off the ‘Generate Lightmap UVs’ setting.
In the inspector, on the Model tab, I can uncheck the box. Once I select ‘Apply’, the box gets reset!
Anybody know what might be resetting that checkbox? Or what I can do to turn it off?
YES!
Thank you!
I’ve been held up for days on this one.
A quick search led me to a OnPreprocessModel() method with the line:
importer.generateSecondaryUV = true;
It seems that having that setting on causes the string for a modelled bow to disappear (no vertices get imported). Turning it off, gets me my complete model again.
I’m not sure why (and I’m open to suggestions for that too ), but at least I can make progress now!
You might want to modify the script to only apply settings on the initial asset import.
Really you probably also don’t need or want to generate secondary UVs for anything that’s intended to be dynamic (like a bow). There’s not a good way I know of to modify settings based on if your model has a rig or not, for example, but for projects I’ve worked on the artists usually have a naming scheme they use that already differentiates between skeletal meshes and static meshes. You could do a name string comparison and skip applying that setting on objects you know will be animated.
I’m going to look into optimising the lightmaps at a later time, so I will look into restoring the setting then. I’ll see if I can come up with a distinction that separates out rigged objects at that time. Naming scheme might work.
Thank you for all the suggestions! You’ve helped me twice today! (and I’ve only posted three times )