Can't include AssetTools in custom module - always can't find type FAssetTypeActions_Base

Hi all,

I’m kind of at my wit’s end here and hoping someone can help.

I have a game module, and an editor module in my project. In my editor module, I’ve defined a custom asset type, and a factory to import/create it. I’m trying to add on ‘reimport’ functionality at the moment, and so far have managed to get reimport half working through implementing some of the functions from FReimportHandler and copying what I see in other Asset Factories like the PaperSpriteSheet.

What I’m trying to do now is add the 'right click->Reimport" menu item functionality, but no matter what forum post, tutorial or module I copy, I simply cannot get my subclass of FAssetTypeActions_Base to build. I always get:

Couldn't find parent type for 'MyAssetTypeActions' named 'FAssetTypeActions_Base' in current module (Package: /Script/MyEditorExtensionModule) or any other module parsed so far.

Now that should be included in AssetTools, but no matter how I modify my build rules, I can’t get it to come through. I have tried adding “assettools” to my modules build rules under:
PrivateIncludePathModuleNames
PublicDependencyModuleNames
DynamicallyLoadedModuleNames
PrivateDependencyModuleNames
PublicIncludePaths
PrivateIncludePaths

in various combinations as per http://cairansteverink.nl/cairansteverink/blog/writing-a-custom-asset-editor-for-unreal-engine-4-part-1/ and PaperSpriteSheetImporter.build.cs, but nothing ever works.

The only thing I can think now is that because AssetTools is under ‘Developer’, that I can’t access it from a ‘game’ editor module?

Anything to help point me in the right direction would be appreciated.

I have created a demo for you of how to create FAssetTypeActions_Base here.

It inherits from the FAssetTypeActions_Base without any compile issues.

I am guessing you have it marked as UCLASS(), which IS NOT ALLOWED! Try copy pasting the Actions I have to your project and see if that helps.

If not, can you share your MyAssetTypeActions class?

Thank you so much, that was exactly it! I had created my new class from the editor, but because this wasn’t a creatable class from the UI I just started with a UObject and changed things afterwards. I had questioned the API_MODULENAME bit, but hadn’t noticed the UClass() markup being a difference between mine and the examples.

I never would have found this without your help, seriously, thank you!

It’s happily compiling now, so now I can get back to actually fixing things again…

I am glad it worked and good luck with bug hunting! Could you please mark my answer as accepted for tracking purposes.