Having actual scene components in a scene component blueprint

ok so being to create scene components is a realy nice addition in 4.7 but something that i realy want in there is a viewport like say i want to have a laser component to attache to certain weapons i want it to be component but currently that is not availabe why? or is there another way? ofcourse child actor is always a choice bu then i don’t have direct acess to its detail tab in the view port so that i can customize that component for that blueprint actor so does any one have any thought on this?

thanks in advance

I assume you are asking for composable Blueprints. To make it short: It’s just not possible (yet?), that’s AFAIK one of the most wanted features in UE4 right know.

Here’s the (a lilttle bit clunky) workaround I’m using right now (let’s call the blueprints BP_parent and BP_child):

In your project:

  • Create a new blueprint derived from BP_child, name it (for example) BP_child_special
  • Preconfigure it (override it’s class defaults)

In your parent blueprint:

  • Add a child actor component and choose the newly created ‘BP_child_special’ as class
  • Add a variable with type ‘BP_child’ (that’s ok, because ‘BP_child_special’ inherits from it) and assign the return value of [yourChildActorComponent] → getChildActor → castToBP_Child to it in the construction script (if you have to access it later)

It’s not really elegant, I know. I’m hoping for some news regarding on this together with you :wink:

thanks for the clarification! and also thanks for the workaround of course currently i am getting used to using c++ and for that matter in c++ it’s pretty easy i just add what ever component i want to a class derived from scene component and it works! (i get everything and a detail panel!)

Hmm, I tried that for myself a few days ago but it didn’t work (couldn’t re-use the newly created class with ‘add component’). But I’m glad that it works for you. :slight_smile:

you have to add a BlueprintSpawnableComponent to the UPROPPERTY of the component to be able to add it inside a blueprint class for example:

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))
    class MODULARSCIFI_API UMasterConnectionPoint : public USceneComponent
    {
    	GENERATED_BODY()
    
    	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Arrow, meta = (AllowPrivateAccess = "true"))
    	class	UArrowComponent * DirectionArrow;
    }

and the credit for this goes to kevin mitchell (https://forums.unrealengine.com/member.php?1893-Shoiko) for sharing his modular building construction project i learned this from his code
this is the forum if your might be interested in taking a look:

https://forums.unrealengine.com/showthread.php?61270-Modular-Construction-Tool-(Updated-3-5-2015)

Hmm, thank you. I thought, I have done that but maybe I’ll give this another try.