// YourActor is derived from AActor (could be AActor, APawn, ACharacter) YourComponent = YourActor->FindComponentByClass<UYourComponent>();