Deleting phantom references in a project

Need help in cleaning up a project.
Deleted folders containing assets I no longer am using.
I deleted these on the desktop. They were at the root of my project inside the Content folder.

Now when I open a previous level, even though there are no actors or references to these deleted assets, I am getting 100s of warnings.
“Failed to load ‘/…’ Can’t find file”

Where are these phantom references coming from?
I also deleted the Saved, DerivedDataCache and Intermedaate folders.

That mean your assets are referencing to something doesn’t exist.
Usually resave and recompile blueprints will solve it.

You can use Modify() function from UObject. But you need to expose it to blueprint.

void UMyFunction::SetAssetDirty(UObject* Target)
{
	if (!Target)
		return;

	Target->Modify();

	auto bpTarget = Cast<UBlueprint>(Target);
	if (bpTarget)
		bpTarget->Status = BS_Dirty;
}

Then use it on blutility.

1 Like

Thanks.
My takeaway is never delete anything on the desktop if it is instanced in your scene!