Which is the best time to update submesh MaterialDefines

Hi everyone
I need to sampler lightmap with uv2, I need to set submesh.materialDefines.LIGHTMAPDIRECTUV=2 to achieve my goal.
After I load Mesh, submesh’s materialDefines is undefine. I find bbl firstly creates materialDefines for submesh after isReadyForSubMesh, when should I get subMesh’s materialDefines and update it?

cc @sebavan

You should never access it directly like this :slight_smile:

Why not setting the coordinates of the texture directly ?

Ohh,Thank you, I don’t know this api before :grin: