Heya I’m having a problem with detecting the class of selected actors.
I have a button in my editor plugin which requires two or more actors of the same class to have been selected. But at the moment when I check the classes of two actors, GetSelectedActors() is actually picking a different object in the scene?!
See this video, where I am selecting each actor in turn, and their class is reported correctly. But as soon as I ctrl-click to multi select them both, GetSelectedActors has picked a totally different object.
I am simply iterating over the selected actors with:
USelection* actors = GEditor->GetSelectedActors();
for (uint16 i = 0; i < actors->Num(); i++) {
UE_LOG(VASFVLog, Warning, TEXT("FVASFVPluginEdModeToolkit::OnlyVolumesSelected Selected Class: %s"), *actors->GetSelectedClass(i)->GetDescription());
}
Which gets called whenever the button is clicked (seen in the video)