Hello all. I have found myself using UObject-inheriting classes as I would a struct in normal C++. The reason for that is that I will often need an object that keeps a reference to another object or has an array of another object. I may also need to have an array of that object in another class. Examples include the nodes of a node graph.
Using USTRUCT for that purpose has given me a lot of difficulties, so instead, I create a UCLASS which inherits from UObject, and it can contain the references as required, and also be put in a TArray in another class. It’s also properly managed by the garbage collector.
I’d like to know if that is a terrible way of doing things, and if so, what would be the proper flow for those kinds of designs. It seems to work fine, but I feel like it may be adding a lot of unnecessary overhead.