Thanks i already changed the tag name as suggested , but it does not resolve the question of what is the epic official solution to c++ gameplaycue. An implementation example.
My c++ gameplaycue never ever gets called, even with the correct tag, but my bp gameplaycue works, you just create a bp cue give it tag name and you can refer to it anywhere, but same does not work for c++ cue.
Hi @anonymous_user_669611a5,
I’m curious if you ever figured this one out. I’m running into the same issue where my C++ GameplayCue is never called, but making an equivalent Blueprint GameplayCue works just fine.
The only other thing I added in addition to what you had was an override for UGameplayCueNotify_Static::HandlesEvent, but that’s not called either
After reviewing the code for the GameplayCueManager, I think I have found the problem.
There is a helper struct named FGameplayCueObjectLibrary that handles loading GameplayCues. It has two attributes for loading the assets into memory: ActorObjectLibrary and StaticObjectLibrary, both of which are of class UObjectLibrary.
In GameplayCueManager.cpp:787, they are initialized with LoadBlueprintAssetDataFromPaths(), which only loads assets from Blueprints.
There is another function called LoadAssetDataFromPaths that may help, but I wasn’t able to override the function InitObjectLibrary in a subclass (I could redefine it for my Subclass, but it wasn’t called due to it not being virtual in UGameplayCueManager).
I’m not even sure if the function LoadAssetDataFromPaths would work here.
Perhaps someone else has an idea to work this out.
My alternative was declaring the GameplayCues in C++ and inheriting from them with a BlueprintClass. This way, I was at least able to write the Cues in C++ (because of my aversion to Blueprints).
Out of all the dumbass â– â– â– â– this engine does on the regular, this has to be up there, no? Why does this CueManager thing even need to exist?
Having to create these Blueprint Cue “Handlers” is a joke , also, hilariously, those BPs cannot be renamed. They have to be GC_[YourGameplayTag]. If you do rename it, the next time you open the editor, it will have unlinked itself from the GameplayCue Editor, and you’ll have to redo it all over.
So the steps to make it work with C++ are:
Go to Tools → GameplayCue Editor
Handlers → Add New (This will create a BP called GC_[YourGameplayTag] inside a hardcoded, random af GameplayCueNotifies folder. DO NOT RENAME THE BLUEPRINT!)
Move the BP to a proper folder that you need it to be in.
Open it and do Class Settings → Parent Class, and re-parent it to YOUR custom C++ GameplayCue.
Pray to god, that for some BS reason something doesn’t break again.
Vomit all over yourself because there’s no way to make it work with C++ only.
Don’t forget that your cue tags MUST all start with GameplayCue.[YourGameplayTag] cause it’s hardcoded somewhere probably.
WHAT kind of wacky tobacky where they smoking, when they came up with this â– â– â– â– ?
2.Tags are must be start with GameplayCue ex)“GameplayCue.BlahBlah”
3.Using BP
I don’t know why their made like this
If you want to use own your GameplayCue class
Make BP class and save in GameplayCueNotifyPaths that you choose in 1section
else editor warn you
Sadly I dont know use Native CPP GameplayCue… Use child BP
4.Cpp class with UCLASS(Blueprintable, Category = “GameplayCueNotify”)
This is most upset part. Nobody tell me this
If Cpp class has no these tags?
Manager never recognize this class
I spent several days trying to solve this but never managed to get my c++ cues to be included in packaging even though it worked in the editor using the suggested solution above. I’m quite new so that’s for sure one reason, but I am very sure now that c++ cues are not really intended to work out of the box without changing the GameplayCueManager code ALOT - even with an “imposter blueprint”. Not being a direct child of one of the native GameplayCueNotify classes seems to be what is causing it not to be packaged.
Don’t create a c++ child class of e.g. UGameplayCueNotify_Static. It will not package. (at least from my experience)
Create your intended gameplay cue in C++
Make it a Blueprint library method and put all your code there
Create a Blueprint Gameplay Cue
Call your blueprint library method from your blueprint gameplay cue.
Hopefully someone finds this and it helps you so you can avoid my pain .