I have a custom actor class that can have either a static mesh, a skeletal mesh, or combinations of the two. I want to have specific default values set when the mesh is added in the editor. Those values are different for skeletal and static meshes, and are somewhat different than the defaults generated when a mesh is created. I want to set these defaults programmatically to avoid having to have content creators set them by hand, which can be easily forgotten.
My initial take was to create a ‘mesh holder’ component that inherits from UMeshComponent which is created with the actor. The desired mesh would then be added as a child of the ‘mesh holder’, and an overridden method that would fire when the child mesh is added. Because my actor can have a combination of meshes, I want to catch whenever a mesh is added.
The problem is that I can’t seem to find which method to override when the actual mesh is added in the editor. Is there such a method called when a child component is added, or is there a better approach to set those defaults consistently?
Thanks in advance.