Problems whith AssetTypeActions

Hi,
I making a pluging with my own Asset type. I registered asset types:

void FMySuperModule::StartupModule()
{
	// Register asset types
	IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools").Get();
	MySuperAssetTypeActions = MakeShareable(new FMySuperAssetTypeActions);
	AssetTools.RegisterAssetTypeActions(MySuperAssetTypeActions.ToSharedRef());
};

It’s MySuperAssetTypeActions.h:

#include "MySuperModulePrivatePCH.h"
#include "AssetTypeActions_Base.h"
    
    class FMySuperAssetTypeActions : public FAssetTypeActions_Base
    {
    public:
    	// IAssetTypeActions interface
    	virtual FText GetName() const override { return NSLOCTEXT("AssetTypeActions", "AssetTypeActions_MySuperAsset", "My Super Asset"); }
    	virtual FColor GetTypeColor() const override { return FColor(149, 70, 255); }
    	virtual UClass* GetSupportedClass() const override { return UMySuperObject::StaticClass();}
    	virtual uint32 GetCategories() override { return EAssetTypeCategories::Misc;}
    	// End of IAssetTypeActions interface
    };

And there are errors:

MySuperModule.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FText __cdecl FMySuperAssetTypeActions::GetName(void)const " (?GetName@FMySuperAssetTypeActions@@UEBA?AVFText@@XZ)
MySuperModule.cpp.obj : error LNK2001: unresolved external symbol "public: virtual struct FColor __cdecl FMySuperAssetTypeActions::GetTypeColor(void)const " (?GetTypeColor@FMySuperAssetTypeActions@@UEBA?AUFColor@@XZ)
MySuperModule.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UClass * __cdecl FMySuperAssetTypeActions::GetSupportedClass(void)const " (?GetSupportedClass@FMySuperAssetTypeActions@@UEBAPEAVUClass@@XZ)
MySuperModule.cpp.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __cdecl FMySuperAssetTypeActions::GetCategories(void)" (?GetCategories@FMySuperAssetTypeActions@@UEAAIXZ)

What did I do wrong?

Did you add the UnrealED dependencies to the build.cs?

Yea

PrivateDependencyModuleNames.AddRange(
				new string[]
				{
					"Core",
					"CoreUObject",
                    "AssetTools",
                    "UnrealEd"
				}
			);

            PrivateIncludePathModuleNames.AddRange(
				new string[]
				{
                    "AssetTools",
                    "AssetRegistry"
				}
			);

            PublicIncludePathModuleNames.Add("LevelEditor");

			DynamicallyLoadedModuleNames.AddRange(
                new string[] { 
				    "AssetRegistry"
                }
            );

OK.I opened MySuperAssetTypeActions.h not in VS project, there was functions without implementation, just

virtual FText GetName() const override
virtual FColor GetTypeColor() const override
virtual UClass* GetSupportedClass() const override 
virtual uint32 GetCategories() override

Adding implementation solved the problem

Thanks for this thread, it was super handy. Here’s the source that I used from your example to make an asset type action work from a plugin.