We are in the midst of creating our own UContentBrowserDataSource that is driven by database calls and could definitely use a bit more information on how the current system is designed. We’ve been able to create folders on demand from that reflect the contents of the database but doing so has been a tedious process of failed attempts. So far it seems like the Navigation Bar, SPathView, and SAssetView all react to different updates paths yet are dependent on each other. Is there any documentation we can reference?
We had a few questions around the implementation of the Content Browser Data Source. As recap: given that we have thousands of products and millions of versions, our assets have to live outside of Unreal, and only loaded or imported as-needed. As such, we’d like to implement a way to access this database through our own Content Browser Data Source (CBDS). The goal is to be able to progressively cache various paths and assets (lightweight asset data, not actual assets unless the user initiates an import), and to be able to access the data in various ways, from asset pickers, SNavigationBars (for picking publish contexts, for instance), and others. As we’ve started to implement it, we’ve encountered a few bumps in the road:
1) Async updates to SNavigationBar
When encountering a new directory that we haven’t fetched yet, we’re able to utilize QueueItemDataUpdate(FContentBrowserItemDataUpdate::MakeItemAddedUpdate()), which allows us to populate the directory once we hear back from the database. However, it doesn’t look like SNavigationBar listens to these updates. How might we update the search suggestions in an asynchronous manner?
2) Support for non-recursive behaviors from a database source.
It seems as though the Content Browser wants to discover all assets and virtual folders when the CBDS starts up, whereas we would only like to surface specific paths as the user navigates through the database tree. It’s been a bit unclear as to what each of the Enumerate calls are intended for. The various Enumerate calls seem to trigger back to back, and often multiple times in a row. As the user navigates the database, or pastes in a path, we should be able to update our local cache which the various enumerate functions trawl.
3) Access to SAssetSearchBox for filtering items with no FAssetData
We’d like to be able to extend the functionality of SAssetSearchBox so as to also query the database for folders or products, so that the user can search the database directly in a seamless manner (this would mean our CBDS implementation could provide search result items that haven’t been cached yet). Is there a way to capture the text in the search box, or at the very least receive a string given a query key? If there’s no way to get at that search box, is there a way to customize the Content Browser’s AssetView to add our own search box?