Gameplay tags becoming invalidated after playing the game?

I’m trying to implement a gameplay tag system that can be used in C++, like Lyra. I have a singleton class called ProjectNameNativeGameplayTags with a function called InitializeNativeTags() that is called in my asset manager’s StartInitialLoading() function. InitializeNativeTags adds all of the gameplay tags using AddTag() and then calls DoneAddingNativeTags().

Every works correctly. But after I play my game in the editor once, the native tags stop working, and TagName.IsValid() returns false. Re-compiling doesn’t fix it; I have to quit and relaunch the entire editor.

Is there some part of implementing native tags like this that I forgot, maybe to do with destruction or uninitialization? Because I can do the same thing in Lyra without ever encountering this issue.

Thanks in advance!

I followed this tutorial and so far it’s working fine for me.
Enhanced Input Binding with Gameplay Tags C++ | Epic Developer Community (epicgames.com)

Regarding your problem, I read in another post that there might be some race conditions but that’s usually when the game start and not when you PIE (Play In Editor) and Stop.

The solution mentioned was to move the initialization to the starting of the module.

1 Like