How can I fix an error with #include AbilitySystemInterface from GameplayAbilities?

I wanted to check out the Gameplay Abilities plugin in the engine, but I can’t get past the first couple of steps from the wiki guide (Setting up the Project, Setting up our Character): A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I can’t get it to compile when I include the AbilitySystemInterface in anything:
#include “AbilitySystemInterface.h”

Everything after that depends on that inclusion. Does anyone know what I might be doing wrong? I have added the plugin to my project, restarted my project, and added the module name to PublicDependecyModuleNames in my build.cs file. I can see the choice to create a new blueprint from the GameplayAbility class and the option to open the GameplayCue window., and I can also see the plugin files in my solution explorer, so I know the plugin is there.

Please add more information. In what way can you not get it to compile? Can the compiler not find the file, or are there errors in it? What are the error messages are you getting?

Steve

Thanks for the reply Steve. So far these are everything that I’ve done:

In MyGame.Build.cs, changed

 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay"});

to

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "GameplayAbilities" });

In MyGameCharacter.h, changed

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "RolePlayingGameCharacter.generated.h"

to

#include "CoreMinimal.h" #include "GameFramework/Character.h"
#include "AbilitySystemInterface.h"
#include "RolePlayingGameCharacter.generated.h"

The error that I’m getting says “cannot open source file “AbilitySystemInterace.h””. So it seems like it can’t find the file. I can’t include any other files from the GameplayAbilities plugin, either, without seeing the same error.

edit: Sorry about the formatting of this comment… It got weird with the code snippets.

I want to also note that if I remove all of those references to GameplayAbilities files, so that the error goes away, then when I try to recompile the GameplayAblities module in the editor via Windows->Modules, the compile fails. The error in the log says “Can’t save a makefile that has invalide contents.”

I was able to resolve the issue by generating Visual Studio project files. I’m not sure why there would be a compiling issue if that’s all it took to fix things, but so it goes. Thanks to Kazuja on the reddit post for running through his steps with me:

Also thanks for starting to assist me here.

To resolve the issue, I opened the project folder within my UnrealProjects directory, rick-clicked on the .uproject, and clicked on “Generate Visual Studio project files”. After reopening my project in the editor and the solution in VS2017, the problem was fixed.

I can confirm this is still a thing that happens and also this answer still solves the issue. I wonder if it has to do with enabling the plugin after the solution was initially created. If so you’d think that enabling this particular plugin should do what the regeneration does.

Works for me. And i’m commenting to tag this answer with my name, to find it easier in case i forget the solution. thx

I also had a similar issue (IntelliSense not working and squiggly lines, though compiling worked).

Regenerating the vscode files helped.
Thank you very much.