I have a custom-built Rich Text system which instantiates various Text Render Components and I’ve been using ChildActors to instantiate it from a Actor Blueprint, but I need to optimize as much as I can and the first thing to do would be to remove these Child Actors.
In order to avoid using ChildActors, I replaced this Actor Blueprint for a Scene Component Blueprint, but now I cannot Spawn and Destroy components freely, I need an Owner, which is currently being the parent of the component.
There’d be no issue if I didn’t need to Destroy these components after some time, but I do.
And every time I need to destroy, I can’t because the Scene BP doesn’t have ownership of the components and this message pops up:
LogActorComponent: Error: May not destroy component TextRenderComponent /Game/Maps/Menu/StreamerLevel.StreamerLevel:PersistentLevel.3DRichTextTest_C_1.TextRenderComponent_14 owned by 3DRichTextTest_C /Game/Maps/Menu/StreamerLevel.StreamerLevel:PersistentLevel.3DRichTextTest_C_1.`
Is there a way to force destroy it or change the ownership of the components, either through C++ or Blueprints, but doing so from this specific SceneComponent BP and not from the Owner BP?
Thanks in advance!