Is there a way to tag actor components?

And by tag I mean adding tag on the component itself, not the instance of it on the actor.
Or is there any other way to categorize actor components? One that doesn’t include blueprint interface? I don’t want to create a blueprint interface just for this.
I’m trying to get only specific types of actor components.
Thanks.

You can always use inheritance, either through base classes (as usual) or through interfaces.

On a side note, if you could explain what you mean by “get only specific types”, maybe we could be of more help. Also, describing the problem you’re trying to solve instead of the implementation you want to achieve usually yields more ideas. :smiley:

1 Like

So, ultimately I want to “save” variables from these components into a save game object. The trick is, the components are added at runtime.
So first of all I need to get all the “saveable” actor components from a specific actor, to store them in a save game object. Then, I’m also storing any variables that need saving from said components.
When I “load” the game, I retrieve the components from the save game object, I re-add them to the actor, and set any saved variables as well.
That’s why I’m trying to get ONLY those components that need saving.

I cannot really use inheritance because some of these components already inherit from different parents. I thought maybe there’s a way without involving creating an interface just for that.

I don’t see a reason why your tag idea wouldn’t work, just add a tag during component construction (or in blueprint details) and that’s it.

1 Like

(post deleted by author)