/Engine/Source/Editor/UnrealEd/Public/EditorViewportClient.h
Enable customization of the EngineShowFlags for rendering. After calling this function, the provided OverrideFunc will be passed a copy of .EngineShowFlags in Draw() just before rendering setup. Changes made to the ShowFlags will be used for that frame but .EngineShowFlags will not be modified.
void EnableOverrideEngineShowFlags ( [TUniqueFunction](API\Runtime\Core\Templates\TUniqueFunction)< void([FEngineShowFlags](API\Runtime\Engine\FEngineShowFlags) &)> OverrideFunc )