When an actor has a blueprintable struct that contains a reference to an actor component and that component is created default in the actor's constructor, the struct and the component will be uneditable in the full BP editor. Both instanced actors in level and the data-only BP editor are unaffected.
1. Create a struct with USTRUCT(BlueprintType, Blueprintable)
2. Add to the struct the following:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="UDNReport")
USpotLightComponent *Spotty;
3. Create a child class of ACharacter (or any other actor, really)
4. Add to the character header the following with protected visibility:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="UDNReport")
FTestStruct MemberStruct;
5. Add in the character constructor the following:
MemberStruct.Spotty = CreateDefaultSubobject<USpotLightComponent>(TEXT("StructLight"));
MemberStruct.Spotty->SetupAttachment(RootComponent);
6. Launch Editor
7. Open Data-Only BP editor
7.1. The light should be accessible, settings can be changed
7.2. Open the full editor. Now the light will appear in the hierarchy but will be uneditable. Class Defaults also now has the struct uneditable too.
7.3. Place the actor in a world, and the settings should be editable on the instance.
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
Why does the REMOVE method of map container remove elements have memory leaks?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
What is the difference between Camera and CineCamera?
How does TArray loop correctly remove elements in blueprints?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-204813 in the post.
0 |
Component | UE - Gameplay - Blueprint Editor |
---|---|
Affects Versions | 5.3.2 |
Created | Jan 24, 2024 |
---|---|
Updated | Feb 13, 2024 |