How do I get the current content directory?

I.e. the directory that is currently displayed in the Content Browser.

If I can get that, can I then get the files/assets in that directory and any child directories?

Thanks.

1 Like

There are some static functions available in FPaths . If you are looking for current content directory FPaths::GameContentDir() will return a path to content directory as FString. You can check it out all folder functions in here: FPaths | Unreal Engine Documentation

Hope it helps :slight_smile:

Buddy

1 Like

Thanks, I can use that to get the root of the content dir, but Iā€™m looking for a way to get the directory the user has chosen, e.g. /Game/Geometry/Meshes from the following picture.

Thanks

103438-currentcontentdir.png

Any success with it?

This is now FPaths::ProjectContentDir()

3 Likes

You can use this.

Select one of your assets, and run this BP.