Download

Actor vs Components

I’ve been building a system for marking objects as Usable and then making sub classes from that for different types e.g. Door, Item, Inspect etc.

I’ve built it in two different versions but I’m not sure which is the ‘correct’ way to do it with Unreal.
Method 1. Usable is a child of Actor which has children UsableDoor, UsableMessage and UsableItem. UsableItem would then just change the mesh and a few variables for id and quantity, door would be similar etc.
Method 2. The same hierarchy but built as components to attach to objects. The reason I moved to this method is that UsableMessage would go on several different objects/scene pieces and having that as an actor didn’t seem right/practical.

I’ve been able to get both methods working fine but I would like to know which would be the proper/better way to do it in Unreal. Method 2 seems more like a Unity way of doing things so I’m worried that isn’t a good idea with Unreal.

Is this question unclear? Should I try explain again?

Either of those should work, but to be honest if I were doing this I would probably be using an interface (actually that is what i did for my own Usable items), as the i could interpret a ‘use’ command on many different objects that may or may not be related.