Less than a year of experience, I have an architecture question.
I have an actor, APiece. It will never be destroyed. However, I routinely create and destroy a representation of that object in my game, a static mesh. So, in my new ue4 brain, I created AMeshPiece. This is the representation on screen that is routinely created and destroyed according to the presence of the APiece.
I’m trying to learn if this is the “right” thinking, or best practice. Couldn’t APiece just have a scene component and a static mesh component which are created and destroyed, without touching the APiece itself? Or given my current structure, could APiece actually be UPiece?
The APiece is part of my save object, and there will be a lot of them. (100-5000). So, if I’m thinking correctly, I’d want to keep APiece as bare bones as possible. Does having a Scene Comp and a Static Mesh Comp bloat APiece(for my save object), even though the pointers won’t be pointing to anything when its saved?
So…how would a more learned developer approach this and why? Thanks!
EDIT - After some research, I feel like I was on the right track originally, but I’m going to change APiece to a UObject. This will be the code representation of the piece. Then, my scene representations of these UPiece objects will be named AActorPiece. These will be spawned and destroyed as needed in the scene.