i
use these code to change all lights color. run in editer it’s ok.
but run in package game,no effect.what’s wrong…
i also make a development package,it always say “changed color”,but no effect,the color not changed.
Hey there, you can try to make a development packaged build and put prints in a few places to see where it doesn’t print, probably its the Contains, but if you print the values you are comparing it might help understanding why it doesn’t execute.
this code executed,but no effect.
i add this code to the end for this func. can control Rotation,but still cannot change the color.
this->GetController()->SetControlRotation(FRotator(R, G, B));
i have set all light “moveable”
this code executed,but no effect. i add this code to the end for this func. can control Rotation,but still cannot change the color. this->GetController()->SetControlRotation(FRotator(R, G, B)); i have set all light “moveable”.
and i also make a development packaged,code executed,but no effect…
i solved this problem.
i rename all the lights like this light_1,light_2,light_3…
in debug model,GetName() return the correct name.
but in other model,GetName() return Light_1,Light_2,Light_3…
i dont know if this is a bug, i control other actor by name all work perfect.it’s always return the name what i set.
but,do with light, the first letter is upper case.
So you are sure that SetLightColor executes on the packaged build, it just doesn’t produce any effect? See if calling MarkRenderStateDirty() on the light component inside the ALight does anything.