Using GameplayTagsEditor module in my custom module

Hi all,

I have a struct that has a FGameplayTag in it and I want the gameplay tag to be there in header and be able to change it. So I’m trying to create a module with details customization.

I have read a [forum post][1] where someone attempted the same and the gameplay tag never appears, and had an answer saying that gameplay plugin might have a customization for FGameplayTag that is being registered.

So I thought I can add GameplayTagEditor module into my module and register the same customization classes for the FGameplayTag.

Here is how everything looks like
In project uproject file, Added the module in modules section

"Modules": [
		{
			"Name": "Mygame",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine"
			]
		},
		{
			"Name": "MygameEditor",
			"Type": "Editor",
			"LoadingPhase": "PreDefault",
			"AdditionalDependencies": [
				"GameplayTagsEditor"
			]
		}
	]

Added additional dependencies as GameplayTagsEditor into my module to make sure that I can access the customization classes.

In MygameEditor.Build.cs file

public class MygameEditor : ModuleRules
{
	public MygameEditor(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		var EngineDir = Path.GetFullPath(Target.RelativeEnginePath);

		PublicDependencyModuleNames.AddRange(new string[] { 
			"Core", 
			"CoreUObject", 
			"Engine", 
			"InputCore",
			"Slate",
			"SlateCore",
			"UnrealEd",
			"PropertyEditor",
			"EditorStyle",
			"Mygame",

			"GameplayTags",
			"GameplayTagsEditor"
		});

		PrivateDependencyModuleNames.AddRange(new string[] {
			"GameplayTags",
			"GameplayTagsEditor",
			
		});

		DynamicallyLoadedModuleNames.AddRange(new string[] {
			//"GameplayTags",
			//"GameplayTagsEditor",

		});

		PublicIncludePaths.AddRange(
            new string[]
            {
                "MygameEditor/Public",
				Path.Combine(EngineDir, @"Plugins/Editor/GameplayTagsEditor/Source/GameplayTagsEditor/Classes"),
				Path.Combine(EngineDir, @"Plugins/Editor/GameplayTagsEditor/Source/GameplayTagsEditor/Public")
			});

        PrivateIncludePaths.AddRange(
            new string[]
            {
                "MygameEditor/Private",
				Path.Combine(EngineDir, @"Plugins/Editor/GameplayTagsEditor/Source/GameplayTagsEditor/Private")
			});
	}
}

And in the Editor Module cpp file

// UE4 includes
#include "GameplayTagContainerCustomization.h"
#include "GameplayTagsEditorModule.h"

// Mygame Editor module includes
#include "Customization/ComboAttackDataCustomization.h"

// Game module includes
#include "Mygame/Data/DA_ComboData.h"

IMPLEMENT_GAME_MODULE(FMygameEditorModule, MygameEditor);

#define LOCTEXT_NAMESPACE "MygameEditor"

void FMygameEditorModule::StartupModule() 
{
    // import the PropertyEditor module...
    FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
    // to register our custom property
    PropertyModule.RegisterCustomPropertyTypeLayout(FComboAttackData::StaticStruct()->GetFName(), FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FComboAttackDataCustomization::MakeInstance));

    PropertyModule.RegisterCustomPropertyTypeLayout("GameplayTagContainer", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FGameplayTagContainerCustomization::MakeInstance));
    PropertyModule.RegisterCustomPropertyTypeLayout("GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FGameplayTagCustomizationPublic::MakeInstance));

    PropertyModule.NotifyCustomizationModuleChanged();
}

When I build this I’m getting linker error for FGameplyTagContainerCustomization.

I did check where FGameplyTagContainerCustomization is and it is inside the FGameplayTagEditor module. Since I did everything to make sure that GameplayTagEditor module is included, it shouldn’t have problem finding the module. By looking at the linker error, its clear that the dll of the GameplayTagEditor isn’t linked because it can’t find the functions.

What am I missing here? Is it even possible to include modules in ue4 engine folder into custom modules?
I even tried creating a plugin and tried the same inside plugin module and had the same result.

Thanks in advance :slight_smile: