Description

This is perhaps a misuse of Instanced properties but the repro info is good so I thought I'd better add it to Jira. See Additional Info URL for details.

Checked and happening on:
//UE4/Main CL-2884111
//UE4/Release-4.11 CL-2885916

Steps to Reproduce
  1. Open UE4Editor.exe QAGAME
  2. File > New C++ Class > select Widget as the parent class > Next > Name it "CreatedWidget"
  3. In VS, set up the following:
    UCLASS(editinlinenew, DefaultToInstanced)
    class UInstancedBase : public UObject
    {
    	GENERATED_BODY()
    public:
    	UPROPERTY(EditAnywhere)
    		int32 Foo;
    };
    
    UCLASS()
    class QAGAME_API UCreatedWidget : public UWidget
    {
    	GENERATED_BODY()
    public:
    	UPROPERTY(Category = UI, EditAnywhere)
    		USlateWidgetStyleAsset* Style;
    	UPROPERTY(Category = UI, EditAnywhere, Instanced)
    		TArray<UInstancedBase*> BaseInstances;
    	UPROPERTY(Category = UI, EditAnywhere, Instanced)
    		UInstancedBase* SingleInstance;	
    };
    
  4. Compile, create a new widget blueprint
  5. Add an instance of 'Created Widget' to the widget blueprint
  6. Select it, add a couple of instances under the "UI" section
  7. Compile

Result: On compile set values are lost.

(Can also check UDN link for further info on repro.)

Have Comments or More Details?

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

3
Login to Vote

Cannot Reproduce
ComponentUE - Editor - UI Systems
Affects Versions4.104.114.12
Target Fix4.19
Fix Commit2897335
Main Commit2910931
CreatedFeb 2, 2016
ResolvedDec 15, 2017
UpdatedMay 4, 2023