Natively inherited Components cannot be deleted

I created a sub-class of USceneComponent; let us call the sub-class UCustomComponent. It gets this additional field:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Collision)
UBoxComponent* CollisionBox;

In Unreal Editor, adding a UCustomComponent to any actor using the “Add Component” button, adds the UCustomComponent and attachs a UBoxComponent as its child (with ‘(Inherited)’ appended), as expected. Clicking the UBoxComponent, in between the details and components panels it reads: “Native components are editable when declared as UProperty in C++”. Right-clicking → deleting does not delete that component. If I delete its parent, the UCustomComponent, it still cannot be deleted. The only way to get rid of it is to delete the entire actor, which is counter-productive.

I will verify in several days whether this behaviour also occurs in the latest version of Unreal Engine.

Sincerely, BlakeArrow

Hello,

I have attempted to reproduce your issue, but have been unable to do so.

Here are the steps I followed:

  • Created a new C++ class based on USceneComponent
  • Added the code that you placed in your original question to the .h file
  • Compiled
  • Created a new actor and added the Scene Component to the Actor
  • I was able to delete the component without issue

Could you tell me if these are the same steps you followed, and if not, what should I be doing instead to reproduce your issue?

Yes, the instructions listed should cause the problem but evidently they do not. I will look into it some more and post updated information should I find out more. I suggest closing this question

Hello,

I am marking this topic as resolved for tracking purposes. If you are able to determine the repro steps, feel free to post a response to this topic. For any new issues, please create a new Answerhub topic.

Have a great day