Everytime i build this code it crashes the editor and when i try to reopen it just crashes again.But when i comment the line of code and rebuild it works again.On SphereComponent->SetWorldLocation(SpotLightPicker->GetActorLocaiton()); when i comment that line of code the editor works again.
it stops it from crashing but doesnt do want i wat it to do.And SpotLightPicker is a UPROPERTY.
But got the code to work just did a new function OnConstruction. Works now
cpp: