Before UE 4.9 I would use GetAllActorsFromClass and it would return a combined list of actors from the persistent level and from the loaded sublevel. After upgrading to 4.9 it seems to be returning only actors from the persistent level. How can I get it to go back to loading all actors from currently loaded levels (both persistent and sublevel).
Thanks for the reply. I tried iterators but got the same result. They must have changed something in 4.9 because this worked fine since 4.7. I tried this:
for (FActorIterator It(()); It; ++It)
{
actorstest.Add(*It);
}
But got actors from the persistent level only.
Basically what I do is I load streamed level and in on BeginPlay I use getallactors. It used to return combo of both persistent level and loaded level’s actors, but now it’s only persistent level actors. I know for sure that my loaded level has actors in it, as I get their “BeginPlay” events.
Hmmm maybe other levels are in different World instances, type in “displayall World” in console and you should see list of all world objects. You could also try using Object iterator, i think it search objects (and actors are also objects) globally not via worlds