Content Browser C++ Classes Updates - How?

Hello alltogether!

I’m looking for a way to refresh my content browsers after manipulating aka moving .h and .cpp files. Live Coding at least updates something meaning it finds the new paths - but doesnt delete old ones, leading to an fatal error when trying to access old paths.

So far i’ve tried:
ContenBrowserDataModule-> Subsystem → deactivate/activate DataSource(TEXT(“ClassData or ClassDataSource”))

and

IContentBrowserSingleton → SetSelectedPaths(
{ ParentPath },
true, // bNeedsRefresh feels like it should refresh
true // bPathsAreVirtual
);

and

IAssetRegistry → ScanModifiedAssetFiles(AbsFilePaths);
as well IAssetRegistry → ScanPathsSynchronous(Paths, true);

and

for (TObjectIterator It; It; ++It)
{
UContentBrowserClassDataSource* ClassDataSource = *It;
ClassDataSource->SetVirtualPathTreeNeedsRebuild();
ClassDataSource->RefreshVirtualPathTreeIfNeeded();
}

but nothing seems to work, and i dont want to expose the necessary objects in engine code since this has to be maintained. Does anyone know how to update/force refresh the content browser without restarting the engine or changing engine code?
And if any unreal developer reads this, can you maybe give us some content browser api for this? :slight_smile:

Live Coding was never intended to manage structural changes, such as moving or renaming files, or adding or removing UCLASS or USTRUCT definitions. Epic’s official documentation explicitly states this.

Any time you move, rename, or delete a C++ file, you should treat it as a “full recompilation” event rather than a Live Coding event. While Live Coding is useful for making adjustments to function bodies, it is not suitable for structural changes.

Thanks for your comment! I get that, but then again live coding already kinda manages structural changes - if i move a file and live compile its classes appear in the content browser - just the old data does not get updated, crashing the editor if trying to access it or its container.
I’m trying to build an manager for exactly this but in vanilla editor, managing redirectors at well, but yeah updating the class data source seems to not be accessible publicly.
Full recompilation seems to be the only way so far..