UE寻找Actor
void FTestButtonModule::PluginButtonClicked() { GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("begin")); for (TActorIterator<AActor> It(GEditor->GetEditorWorldContext().World()); It; ++It) { if (It) { FString name = It->GetName(); UE_LOG(LogTemp, Log, TEXT("%s"),*name); } } //if (MyActor != nullptr) //{ // FText DialogText = FText::Format( // LOCTEXT("PluginButtonDialogText", "以找到"), // FText::FromString(TEXT("FTestButtonModule::PluginButtonClicked()")), // FText::FromString(TEXT("TestButton.cpp")) // ); // FMessageDialog::Open(EAppMsgType::Ok, DialogText); //} }