Hi.
more info and data here:
Steps to reproduce issue:
- Create a custom SceneComponent on c++.
- add a component as property to this component
Code is as follows:
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class MYPROJECT_API UChannelSwitchComponent : public USceneComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UChannelSwitchComponent();
// Called when the game starts
virtual void BeginPlay() override;
// Called every frame
virtual void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction ) override;
UFUNCTION(BlueprintCallable,Category="Channel Switching")
virtual bool ChannelSwitch();
//PROBLEMATIC COMPONENT
UPROPERTY(EditAnywhere, BlueprintReadWrite)
ULightComponent *LightComponent;
};
- Go to Editor and attach this component to a Blueprint
- Select the PRoperty component from the DropDownMenu
-
At this moment, this property component gets attached to the actor.
-
if you make ANY change to the Custom Component, UE4 will crash. Error is on ComponentInstanceDataCache.cpp
line 231.
Unreal engine shows the following warning in the logs
PIE:Warning: Warning AttachTo: ‘/Game/Pieza.Pieza:PersistentLevel.Samsung_LED_TV_Blueprint_40.Samsung_LED_TV’ already attached to ‘/Game/Pieza.Pieza:PersistentLevel.Samsung_LED_TV_Blueprint_40.ChannelSwitchableLight’, would form cycle. Aborting.
Where Samsung_LED_TV_BLUEPRINT_40 is the blueprint in which i attached the custom component
NOTES: if you use a ActorComponent, UE4 won’t crash but when you select the UPROPERTY Component on the EDITOR, it becomes the new ROOT, and it becomes IMPOSIBLE to change the root, it shows an error warning saying:
“The selected component is inherited and cannot be reordered here”