if (FModuleManager::Get().IsModuleLoaded("AssetTools"))
{
// Unregister our custom created assets from the AssetTools
IAssetTools& AssetTools = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
for (int32 i = 0; i < CreatedAssetTypeActions.Num(); ++i)
{
AssetTools.UnregisterAssetTypeActions(CreatedAssetTypeActions[i].ToSharedRef());
}
}
CreatedAssetTypeActions.Empty();
I checked the IAssetTools file to see if there is any function to unregister the asset category but there is none.
It didn’t work though, it is still showing up twice.
I have created a small project using similar code you have provided [GithubLink][1]. It works as intended, so we can assume the error is elsewhere in your code. Please go trough the plugin code and try to spot what you have done differently in other classes.
Oh hey thanks to your comment I realised that factories are the ones responsible for creating these menus and that I had two factories (one for creating and one for importing) and forgot to set the
bCreateNew = false; // turned off for import
bEditorImport = true; in import factory
That is why import factory is also showing up in the menu