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.
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
Head over to the existing Questions & Answers thread and let us know what's up.
8 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.8.1 |
Created | Jul 7, 2015 |
---|---|
Resolved | Jul 14, 2016 |
Updated | Jul 14, 2021 |