Download

Actor IsHiddenEd() always false even when hidden

I am iterating through actors in the editor and doing some logic based on whether they are hidden or not, but when I check if the actor is hidden it always returns false, even if the actor is in fact hidden.



for (TObjectIterator<AActor> actorItr; actorItr; ++actorItr)
{
    UE_LOG(MPCJsonExporter, Log, TEXT("Actor hidden %d"), actorItr->IsHiddenEd());
    if (actorItr->IsHiddenEd() && !flags.includeHidden)
        continue;
    // Export
}


The intention is that the artist can click the eyeball in the scene hierarchy to hide actors they don’t want to export. Clicking the eyeball does hide the actor in the editor view, as does pressing “H” with the actor selected. But in both cases when querying this method on the actor, it returns false.

Disregard this. It is suddenly working.