I’m make a pretty data-heavy game, and I find myself needing a boatload of classes whose only real job is to store structs; character data, item information, and so forth. Nobody will ever instantiate these classes in the world, their only job is to be #included by other stuff that needs to use their structs. I want replication and garbage collection, which means they need to be a child of UObject, but is there a “correct” class I should be specifically inheriting from? I’ve been using AActor, but that seems like a wasteful choice when you consider that they don’t actually enter the world.
UObject is a nice choice for this, you can replicate it but you need an Actor.
For example, for your Items, you can create a PlayerState, make an UItem (who can be replicate, use this topic : Replicating TArrays crashes game - C++ Gameplay Programming - Unreal Engine Forums) and use your TArray<UItem*> as Inventory in your PlayerState, it’s a simple setup but it work, make it better when you understand all the replication stuff
Also, read this topic to store your data, Singleton Class is really nice to do this : A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums
I hope this help you !
This is super-helpful, thank you for the recommendations and the further reading!