Gameplay Tags Can't Be Edited As Keys In Maps?

Some discuss first here, but for those who want go straight to the answer Jump into Summary section .
I have faced the same problem, cause I use DataHandle workflow to…
・Contain multiple of Data in one Actor.
・To accessing them easily, and to avoid hard refference worries.
・And for Debbug stuff too, cause GameInstance doesn’t have any tick solution in the first place.

It’s basically an actor with no class reference , but with a bunch of simple variable and low cost memory, so I tought accessing all classes tag via DataHandle is more convinient workflow than using bunch of interface or accessing with cast, or something else.

Summary➤

And here is the replacement method for this. The key is Component using component you can create any type of variable at runtime. This could resolve many problem you are facing with blueprint logics.

1.So, I created GampleyTagComponet that contain a ObjectReferenceClass and Container in it.
image

2.Then I created event that creates GameplayTag at runtime by taking other class self instance.

3.DataHandle take that self instance and pass to Directly in Register Macro


Add elem to empty space is an custom macro I already posted on my twitter here :

and Random Id macro is simply an macro that generate random Id every tick that I used for performance test, but actually you need to store the class name for accessing tag particularly later.

4.Now you need to access, those tag so here is GameplayTag(Self)and Other Referenceand Add/Remove TagMacro


Now you are good to go!

There is no problem with performance , I tested with more than million actorcomponent and try to find by its tag. Maybe 10k-100k around wouldn’t affect on FPS. If you need more , I think you will need to create an custom find by tag function that get child length and separate into 10k and split the process to the next tick, or making more smart reusable actor to avoid overhead.

I know that there is no problem in these warning ,but it’s annoying and I wanna know how to get rid of them without separating the nodes.

1 Like