In 5.6.1 when inline editing a level instance the “Show Only Selected” hides all actors, including the one in the level instance which is being edited. In 5.7.4 this does not happen. Because we’re currently using a 5.6.1 engine branch, is it possible to point me at a git commit that I could cherry pick to get this feature working again for our level designers?
That problem was not directly addressed. It was a side effect of CL44110982. You don’t need to fully integrate this CL. I was able to isolate the fix to a single method in EditorActor.cpp:
static void SetActorVisibility(AActor* Actor, bool bVisible)
{
using namespace UE::Editor::DataStorage;
// Save the actor to the transaction buffer to support undo/redo, but do
// not call Modify, as we do not want to dirty the actor's package and
// we're only editing temporary, transient values
SaveToTransactionBuffer(Actor, false);
//Use this API that will affect any actor
Actor->SetIsTemporarilyHiddenInEditor(!bVisible);
/* if (const ICompatibilityProvider* DataStoreCompat = GetDataStorageFeature<ICompatibilityProvider>(CompatibilityFeatureName))
{
RowHandle Row = DataStoreCompat->FindRowWithCompatibleObject(Actor);
if (ICoreProvider* DataStore = GetMutableDataStorageFeature<ICoreProvider>(StorageFeatureName))
{
FVisibleInEditorColumn* VisibilityColumn = DataStore->GetColumn<FVisibleInEditorColumn>(Row);
if (VisibilityColumn)
{
VisibilityColumn->bIsVisibleInEditor = bVisible;
}
DataStore->AddColumn<FTypedElementSyncBackToWorldTag>(Row);
}
}
*/
}
I have only lightly tested so I can’t promise this won’t have side effects.
That is really weird. It works fine in my 5.6 based stream. I validated the function in the persistent level and while editing a Level Instance in-place. Both act as expected.
Thank you for getting back to me. I implemented this workaround but it sems like the behavior of “Show Only Selected” no longer works. I believe what should happen is that all actors which are in the LI you are editing, with the exception of the current selection, should be hidden. It appears that with this code nothing happens.