引用
#include <EngineUtils.h>
代码
TActorIterator<TargetClass> It = TActorIterator<TargetClass>(GetWorld());
for (It; It; It++) {
if (It) {
if (It->GetName() == "TargetName") {
//YourCode
}
}
}
#include <EngineUtils.h>
TActorIterator<TargetClass> It = TActorIterator<TargetClass>(GetWorld());
for (It; It; It++) {
if (It) {
if (It->GetName() == "TargetName") {
//YourCode
}
}
}