Modify Intensity of PointLight

I’m totally ■■■■■■ off. Anyone can guide me, how can I modify Intensity of PointLight in C++ script? Give my some tips. Thanks in advance.

I write this code but I got an error:

AActor* myActor = GetOwner();
myActor->FindComponentByClass(<UPointLightComponent>)->SetIntensity(0.0f);

If that’s not a typo, your problem is probably on your use of FindComponentByClass. The parenthesis should come after the type, not surround it:

myActor->FindComponentByClass<UPointLightComponent>()->SetIntensity(0.0f);

Thanks for your answer. :slight_smile: