Using C++ to get level info

I create PointLight on my level. How can I get access to PointLight from C++?
I need do simple stuff like “in trigger press E → PointLight off”, but in C++ code. What should I use?

You can use an actor iterator to get the information, but the problem if you do that is that you pretty much get ALL of the pointlights in the scene;

for (TActorIterator<APointLight> ActorItr(GetWorld()); ActorItr; ++ActorItr)
{
	APointLight *PointLight= *ActorItr;
    //Do whatever you want with the pointlight here
}

You could potentially check the distance between the player and the pointlight, activating only the closest one to the player, but that’s up to you.

Maybe you know another method, by the name of PointLight, I guess. I saw something like that in another project here, but I can’t find it now