C++ Open static mesh, remove collision and save package ?

Hi,

How can I save a loaded package ?

here’s what I came up with so far

	auto MeshAsset = ConstructorHelpers::FObjectFinder<UStaticMesh>(*FString(path));

	if (MeshAsset.Succeeded())
	{
		MeshAsset.Object->GetBodySetup()->RemoveSimpleCollision();

thanks for your help

Hi phil123456,

Check out FEditorFileUtils::PromptForCheckoutAndSave({Package},false,false);

yeah but I am not even sure the asset is modified with my code

Experiment - try adding these:

		mesh->CreateBodySetup();
		mesh->PostEditChange();