How to store an Actor as pure data?

Hello, I am fairly new to Unreal Engine and its method of handling Objects and Actors, but have experience programming in Java and to a limited degree C++. I was wondering if their was anyway to store and Actor, and all of its individual properties, as pure data instead of creating a reference to that Actor existing in the game world. The reason I want to do this is so that I can store and actor and it’s individual properties, and then remove that actor from the game would completely. Also, I would like this storage to work with any child classes as of what i’m trying to store as well.My overall goal is the creation of an Inventory system which actually stores Actors instead of using Unreal’s tutorial’s method of simply taking a reference and then hiding the Actor’s meshes, a system which I find to be very cumbersome to the games performance as well as unstable. Iv’e been trying to figure out a way to do this for some time and have met with no success, so I would appreciate if anyone could point me in the right direction, thank you.

I suggest storing a reference to the actor and then removing the actor from the scene. The existence of the reference prevents the actor from being deleted by garbage collection and removing it from the scene is probably closer to what you want than just hiding the actor’s meshes.

Keep in mind though that those who made the tutorials might know what they’re doing.

I appreciate the response, though after five years I have to admit it was a pretty silly question. I really had no idea how c++ worked at the time. I was thinking of it like Java or c# with just different syntax without understanding pointers or its differences in structure, or anything about it really. I was use to Unity3ds very object-oriented structure for game design, as in its philosophy with objects and components.

With the hiding the mesh thing that still seems a bit silly. My problem with it was moving between scenes confused me at the time, but now I know there are lots of ways to deal with that.

Anyway, I appreciate the response. I was really surprised to see the response notification in my email, I had totally forgotten about this. I have since started college and taken some c++ and general programming courses so I am a bit less lost in the dark now, or more I know enough to know how little I know. But still reading 3 years ago me’s question was a blast from the past. Thanks for responding to a very silly question.

Your question made sense to you back then. It might make sense to someone else right now :slight_smile:
And yeah on second thought I agree with you that making the actors invisible is a silly way of achieving the goal.