// Fill out your copyright notice in the Description page of Project Settings. #include "MyCustomActorFinder.h" #include "Engine/World.h" #include "GameFramework/Actor.h" #include "EngineUtils.h" AActor* AMyCustomActorFinder::FindActorByName(const FString& ActorName) { for (TActorIterator It(GetWorld()); It; ++It) { AActor* Actor = *It; if (Actor->GetName() == ActorName) { return Actor; } } return nullptr; }