Download

Object and Actor Classes

I’m relatively new to Unreal Engine. I had a question regarding actor and object classes.

I implemented a inventory system with an actor component. Within that actor component, each item is of an object class. However, I am now working on the player being able to pick up items from the level. Since the items are not actor classes, they cannot be placed in the level. Is there a way to convert an object class to an actor class?

Thanks!

Things you want to place in the level need to be actors. You can still use a system using objects because the actors are objects.

Actors in your game are the visual component of the Actors Object Reference. Said object reference is what you store in the inventory.

So create your actors to be placed in the world. Get a reference to the actor and store its object reference in the inventory actor component.

For each type of item create a parent class. for each item of type create a child from parent.