Description

Changing a component's collision setting in a class constructor will update new instances of the class/component with the collision change, but new instances of a child BP do not reflect the change.

This is not a hot reload issue as the behavior is the same when compiling with the editor closed.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor (MyActor)
  3. Add the following to MyActor.h
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
    		UCapsuleComponent* CollisionComp;
    
  4. Add the following to MyActor.cpp constructor
    	CollisionComp = CreateDefaultSubobject<UCapsuleComponent>(TEXT("CollisionComp"));
    	CollisionComp->SetCollisionResponseToAllChannels(ECR_Overlap);
    	RootComponent = CollisionComp;
    
  5. Compile
  6. Create Blueprint based on MyActor (MyActorBP)
  7. Add instance of both MyActor (C++ class) and MyActorBP (blueprint) to the viewport
    • Notice both capsule components have Custom Collision set to Overlap
  8. In Code, Change ECR_Overlap to ECR_Ignore and compile
  9. Add new instance of both C++ class and blueprint to the viewport

Result:
C++ Class instance shows collision setting as Ignore while blueprint instance still shows collision setting as Overlap

Expected:
Both C++ class and blueprint have the same collision setting after updating the code.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-39981 in the post.

4
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint
Affects Versions4.13.24.14.14.15
CreatedDec 21, 2016
ResolvedJan 2, 2018
UpdatedJul 14, 2021
View Jira Issue