Sub-Components UE4

Sub-Components (UE4)

Is it possible to create a SceneComponent in an Actor and create an ActorComponent and both depend on eachother?

Some additional info about that:

  • Actor must be unknown, no inheritance on the owning Actor.
  • CreateDefaultSubobject does NOT work as UE4 does not support this behaviour for Components inside other Components. For example you loose your object and data if your Blueprint failed to compile.
  • C++ and Blueprintable to use it.
  • It must be that way because I want to share implementations across different Components that cannot be reparented.

Is there anything that devs use by default if this dependency is needed? Thank you!

As noone gave an answer to this, is there not an simple answer to this? Because I have something working in UE that acts like the Dependency Injection Pattern.

Anyone interested in Sub-Components in UE4/UE5 that fully supports the editor without data loss and just gives all the editing features we want?

1 Like