/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h
Find the references of the mesh MeshToBeReplaced on all the MeshComponents provided and replace it by NewMesh. The editor should not be in play in editor mode.
[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Dataprep", Meta=(DeprecatedFunction, DeprecationMessage="The Editor Scripting Utilities Plugin is deprecated - Use the function in Static Mesh Editor Subsystem")) static void ReplaceMeshComponentsMeshes ( const [TArray](API\Runtime\Core\Containers\TArray)< class [UStaticMeshComponent](API\Runtime\Engine\Components\UStaticMeshComponent) * > & MeshComponents, class [UStaticMesh](API\Runtime\Engine\Engine\UStaticMesh) * MeshToBeReplaced, class [UStaticMesh](API\Runtime\Engine\Engine\UStaticMesh) * NewMesh )