Description

If the VisibleAnywhere specifier is use in the UPROPERTY macro of a code based component, changing that component from one type to another (from USphereComponent to UBoxComponent for example) will cause the details panel for that component to become ineditable in the blueprint.

Possible workarounds include using EditAnywhere instead of VisibleAnywhere or creating a new blueprint which will reflect the changes.

Steps to Reproduce

1. Open UE4 Editor (any project)
2. Add code to project based on Actor (MyActor)
3. Create a blueprint based on MyActor (MyActorBP)
4. In the header add the following:

UPROPERTY(VisibleAnywhere, Category = "Components")
	class USphereComponent* SphereOriginal;

5. In the source file add the following to the constructor:

SphereOriginal = CreateDefaultSubobject< USphereComponent >("SphereOriginal");

6. Compile the project (Note the detail panel for SphereOriginal component)
7. In code, Change USphereComponent to UBoxComponent in .h and .cpp files
8. Compile again

Result:
The component name shows "None" and the details is empty.

Expected:
Changing the type of a component changes the details to match the new component type

Have Comments or More Details?

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

8
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.8.1
CreatedJul 7, 2015
ResolvedJul 14, 2016
UpdatedJul 14, 2021
View Jira Issue