Is there a way to tell what instantiated an Actor/Object?

I’m writing a json save/load system and noticed it is picking up things like WorldSettings, a default Brush, DefaultPhysicsVolume, etc that the engine instantiates for it’s own purposes. They shouldn’t hurt anything for now, since I try to find an existing actor/object before instantiating it and they don’t have any data associated with them. But I’m instantiating actors/objects that aren’t found, and it might cause problems if some of these actors stopped being instantiated by default.

So I’m hoping there is some flag somewhere that you can check that tells whether an actor/object was built into the level, or created by the engine, or instantiated from game code. Then I can just skip anything that didn’t come from game code. Does such a thing exist?

Hello SurlyVagrant,

There are a few ways you can keep track of these Actor/Objects using “tags” or gameplay tags. Through the editor, we can filter this category. Here is an example on one of the engines pre-made level components.

by clicking the + button, you can add additional tags to the array. Alternatively, if you wanted to customize your own Gameplay tags within c++, There is some documentation that goes into robust details of the GameplayTags classes, and their implementations. I’m going to include two links to further documentation, I hope you find it useful!

Link to the :[Overview of GameplayTags][2]

Link to the: [.api unreal documentation on the GameplayTag classes][3]

I considered that, but I was hoping there would be a more automatic way to do it. I guess it isn’t that different from marking things with CPF_SaveGame, though, which I’m already using anyways.

Children will inherit tags, correct? I didn’t see any mention of that after a quick look through the docs.

That is correct, however if you do find any unintended behaviors, please report back with your findings.

Thank you.

Will do. Already implemented checking tags and it works fine so far. Thank you for the help.