When trying to use the following setup:
-
Have a C++ Class for a UBoxComponent, which has a sub component (like a Paperflipbook)
-
Setup the constructor of this new component
UPROPERTY(BlueprintReadOnly, EditAnywhere, Category=“Display”)
class UPaperFlipbookComponent *Pointer;–CONSTRUCTOR–
//Create sub objects
Pointer = CreateDefaultSubobject(“Pointer”);
Pointer->AttachToComponent(this,FAttachmentTransformRules::KeepRelativeTransform); -
When adding this new object, the actor will first, not detect the SubObject as part of the hierarchy
- When deselecting the object and selecting it again, the object get “setted” but we’re unable to remove it… it gets ATTACHED forever to the actor
After deleting the custom component, the subcomponent will still stay… nothing EXCEPT UNDO, can remove this sub component