Description

When a code based actor component has an exposed array of actor components, adding an element to the array in the editor will add the component to the actor but removing that element does not remove the component.

Workaround:
If the project is closed/reopened after removing the array element, the associated component will be removed from the actor.

Steps to Reproduce
  1. Open UE4Editor (any project)
  2. Add code based on Actor Component (MyComp)
  3. Add the following to MyComp.h
    		UPROPERTY(EditAnywhere, Instanced, Category = Test)
    	TArray<UActorComponent*> ArrayName;
    
  4. Compile
  5. In the editor, create a blueprint based on actor (MyActor)
  6. Add instance of MyActor to the level
  7. In the details panel, use the Add Component button to add My Comp
  8. Select Array Name in the details and add an element to the array
  9. Set the drop-down to Box Collision
    • Note that a Box collision component is added to the component hierarchy
  10. Press the trash Icon to remove the element of the array

Result:
Box Collision component still present on actor

Expected:
Removing the array element removes the associated component

Community References

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.11.2
Target Fix4.15
Fix Commit3223751
Main Commit3227721
Release Commit3079107
CreatedMay 10, 2016
ResolvedDec 6, 2016
UpdatedApr 27, 2018