cannot change lightcolor at runtime



void AFPSCharacter::SetLightsColor(float R, float G, float B)
{
    FString strPreFix = "light_";
    TActorIterator<ALight> AllActorsItr = TActorIterator<ALight>(GetWorld());
    while (AllActorsItr)
    {
        FString strName = AllActorsItr->GetName();
        if (strName.Contains(strPreFix, ESearchCase::CaseSensitive))
        {
            AllActorsItr->SetLightColor(FLinearColor(FColor(R,G,B)));

        }
        ++AllActorsItr;
    }
}


i use this code to change all lights color at runtime. run in editer,it’s ok.
but run in shipping game,it’s have on effect。
how can i do?

Hi,

are your lights set to at least stationary or movable ?
If it’s set to static the paramaters won’t be updated.

jnat