In my Level BP, I’ve got some nodes that can find all Spotlights and print out their parameters - see below. My question is: how do I achieve this in code? So far I’ve got:
for (TActorIterator<ALight> Iter(GEditor->LevelViewportClients[0]->GetWorld()); Iter; ++Iter)
{
FLightInScene *TheLight = new FLightInScene;
TheLight->Translation[0] = Iter->GetActorLocation().X;
TheLight->Translation[1] = Iter->GetActorLocation().Y;
TheLight->Translation[2] = Iter->GetActorLocation().Z;
if (Iter->GetClass()->GetDesc().Equals(TEXT("SpotLight")))
{
TheLight->LightType = ELightTypes::SpotLight;
StaticCastSharedPtr<ASpotLight> ????
}
}
How do I cast to a spotlight so I can get the spotlight-specific parameters?
thanks!