Specifically, what I want to do two things:
- open/select a specific content folder in the content browser using C++
- select specific assets using C++
Is there a way to do this?
Specifically, what I want to do two things:
Is there a way to do this?
Are you sure you wanted to answer my question? Because I donât want to load anything, I just want to highlight it in the content browser.
Deleted answer⌠You have access to the source code, dig around for the slate stuff and find. If you have VAX, should make it easier to locate.
You can communicate with content browser, but not sure if you cna do what you asking as some of editor UI is design to react to user interaction the listing to code somewhere else.
Content browser is contained in itâs own module
via Get() function you can get this:
You can get main module class via ModuleManager
Here you can browse ContentBrowser module code, best way to learn how to do things in editor is to check how engine modules themselfs talk to them
You could try also searching other editor components that talk to content browser and see how they talk to it, thats pretty much only way to learn how to do editor code as there practicly 0 documentation for it, which is not suppriceing as it a lot more complex then gameplay code.
Also reminder, rememeber to filter the editor code in your module with #if WITH_EDITOR or make separate editor only module for it which is common practice in engine code it self. If you donât do that you game or game that use you plugin if itâs a plug in wonât package
I just wanted to add that if you make a list of objects that directly reference content browser assets, you can bring them up in the content browser already selected like this (youâll need to include âEditor/ContentBrowser/Public/ContentBrowserModule.hâ):
FContentBrowserModule& ContentBrowserModule = FModuleManager::Get().LoadModuleChecked<FContentBrowserModule>("ContentBrowser");
ContentBrowserModule.Get().SyncBrowserToAssets(MyUObjectTArray);
I already use the ContentBrowserModule and Singleton for querying the selected assets, but didnât see appropriate setters.
The next thing I wanted to try is track the behavior for the âshow asset in content browserâ buttons that are part of the asset-widget, but couldnât get to it yet. I should have mentioned that in my question.
But thanks for your list of references, at least I didnât miss anything obvious during my research.
Great, that was it!
Thank you very much!