x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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): https://wiki.unrealengine.com/GameplayAbilities_and_You

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.

Product Version: UE 4.17
Tags:
more ▼

asked Oct 19 '17 at 12:41 AM in C++ Programming

avatar image

tmo4517
16 1 4 5

avatar image Steve Robb STAFF Oct 19 '17 at 09:45 AM

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

avatar image tmo4517 Oct 19 '17 at 12:45 PM

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.

avatar image tmo4517 Oct 19 '17 at 01:19 PM

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."

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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: https://www.reddit.com/r/unrealengine/comments/77cmmc/looking_for_help_with_understanding/

Also thanks Steve 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.

more ▼

answered Oct 19 '17 at 02:24 PM

avatar image

tmo4517
16 1 4 5

avatar image Levitikon217 Jun 19 '19 at 10:38 AM

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.

avatar image 5v29n Jul 03 '19 at 04:58 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question