Creating a light dinamically disables some options?

I’ve made a light with a plugin inside the editor nothing too fancy


APointLight* MLight = World->SpawnActor<APointLight>(FVector(0, 0, 300), MActorRotation, SpawnInfo);
...
ULightComponent* LightComponent = Cast<ULightComponent>(MLight->GetLightComponent());
...
blablabla

I’ve tried to add an ies to it with (the .ies file was already loaded ok)


UObject *lpobj = StaticLoadObject(UTextureLightProfile::StaticClass(), NULL, *(lpname));
LightComponent->SetIESTexture(Cast<UTextureLightProfile>(lpobj));

But it didn’t work, my surprise is that a light created throught code doesn’t allow to add an ies file even manually I mean in the editor.

This could be a bug or my fault?

Thank you in advance

My bad, static doesn’t support IES, the question now is why?

Even more tricky I can create it as stacionary but the icon looks disabled (red cross on the viewport).

If I transform it to static in code the icon looks ok but I need to change a parameter (whatever under light tab) to make it working on the viewport.