Gameplay Tags from custom plugin not loading

Hello there!

I created a custom plugin in 5.3 and I want some gameplay tags to be part of it. I have found several older threads explaining the following method:

  • My plugin name is “MyPlugin”
  • Inside its folder, I created the subfolder Config/Tags
  • Inside Config/Tags, I created an INI file named MyPluginTags.ini

Finally, my INI file contains the following:

[/Script/GameplayTags.GameplayTagsList]
GameplayTagList=(Tag=“MyTag.Red”,DevComment=“”)
GameplayTagList=(Tag=“MyTag.Blue”,DevComment=“”)

Unfortunately, these tags do not show up in the gameplay tags list when my project is opened.

Am I missing something?

Cheers!

My issue has been solved by doing the following steps. For clarity purposes, I will keep naming the plugin MyPlugin. Replace every occurency of MyPlugin by your actual plugin name to make it work on your side.

  1. Adding “GameplayTags” to the PublicDependencyModuleNames in MyPlugin/Source/MyPlugin/MyPlugin.Build.cs :point_down:
PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core",
				"GameplayTags"
				// ... add other public dependencies that you statically link with here ...
			}
			);
  1. Editing the FMyPluginModule::StartupModule() function in MyPlugin/Source/Myplugin/Private/Myplugin.cpp :point_down:
void FMyPluginModule::StartupModule()
{
	UGameplayTagsManager::Get().AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("MyPlugin/Config/Tags"));
}
  1. Rebuilding the plugin from source on a clean empty project.

After doing these 3 steps and reimporting my plugin in my actual project, I got access to my plugin gameplay tags as desired :slight_smile:

Hope this helps anyone stumbling upon the same issue.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.