Use of PublicDependencyModuleNames list in Build.cs

Sorry, new to Unreal and still trying to figure stuff out:

I’m looking at the enhanced input tutorial and I see I needed to add “GameplayTags” to the PublicDependencyModuleNames list to avoid linker errors after I have created the MyGameplayTags class.

  1. I don’t understand why I get a linker error without adding “GameplayTags” to this list when I don’t have anything else referencing MyGameplayTags class yet.

  2. Why am I adding “GameplayTags” and not “MyGameplayTags”

  3. I don’t understand the role of PublicDependencyModuleNames list in Build.cs Previously I had created my own classes / headers and used them from within Actor derived classes without having to add them to this list.

Unreal is made up of modules. Your MyGameplayTags class inherits from a class that’s inside the GameplayTags module.

I highly recommend this video. The guy explains how projects are structured in Unreal.
Unreal Engine C++ Project Setup, From Scratch | Alex Forsythe

1 Like

Thanks very much for that link, it was most enlightening.

1 Like