Instanced static mesh building lighting issue

Hi, as stated in the title I have an issue with instanced static meshes and lighting build. I know that the thread has been opened several times but I’ve read all I could find without finding out anything.

Basically I’ve build a little actor blueprint that allows me to procedurally place some instanced meshes in the scene using a spline and controlling some basic stuff like random scale\rotation\position etc.

This blueprints creates the static mesh components via construction script, since there’s no fixed number of smc that I have to use: the variety of static meshes used for actor may change based on my needs. The static mesh used, the number of instances and their transform are of course also chosen via construction script.

The actor itself only contains the spline by default. That and the Default Scene Root are both set to static, and the instanced static meshes created by the blueprint are too. Nonetheless when I build the lighting it doesn’t get built for these meshes, who just retain the same lighting as a movable mesh. They cast and get only cascade shadows and therefore weight on the fpss way more than I’d like them to.
Does anybody knows what the problem is? I think that maybe is the fact that I’m adding the components via blueprint so the engine in some way considers the actor to be empty. I hope so, because in that way I could just set myself a limit of say 5 different geo types per asset and then just add the components in the blueprint by myself and make the construption script only handle the instancing. But if the problem was in the instancing side i really wouldn’t know what to do.

Thank you in advice and sorry for my bad english :smiley:

Ok, for anyone having the same problem. Unfortunately the only solution was to create the instanced mesh components directly by hand and not with the construction script. I also needed to move the procedural building from construction script to an in editor called function (actually I still have the CS version of the script, I’m just disabling it when I’m ok with the result). Later I will see if i may be able to destroy the unused components just to avoid having random empty components laying around.

Thanks, this solved my problem!