Download

SceneComponent With Child Components

Hey all,

I’ve been trying to do this for a while now, but I just can’t. Perhaps there’s some basic concept I haven’t fully grasped yet.

I’m attempting to define a Blueprint (let’s call it MyComponent) based off SceneComponent, that I can attach to a Pawn. MyComponent should itself be a container for several other components, like a collision sphere and a billboard. The first bit is simple enough; I can easily add a MyComponent to a Pawn. The problem starts when I try to add the child components to MyComponent in the Blueprint. The reason I’m doing it in Blueprint is that I don’t want the user to have to manually add a whole host of components to MyComponent and potentially do it incorrectly; I want MyComponent to expose a set of variables, and through them define the nature of its child components.

So the problem that I’m having is that I can’t for the life of me find out how to add child components to MyComponent in Blueprint. Blueprints based on Actor have a handy Components view where I can lay things out nicely, but as I’m basing mine off of SceneComponent, I don’t have that luxury.

Any tips about how I can go about this would be much appreciated! :slight_smile: