Description

Various licensees are reporting data loss on load due to the change that was made for [Link Removed] in which we now defer Blueprint CDO construction on load until the finalization phase.

This issue is limited to Blueprint assets with circular dependencies and only when loaded asynchronously via other dependent assets in the editor.

Current suggested workaround in lieu of a fix is to reconfigure referencing assets to avoid loading Blueprint assets asynchronously as a dependency (i.e. by either removing the circular dependency from the dependent asset, removing the reference that triggers the load as a dependency, or by using a "soft" object reference in a referencing asset that is loaded asynchronously.

Steps to Reproduce

Repro steps in Lyra project:

  1. Create a native class in C++ (UObject-based):
    // NativeBase.h:
    #pragma once
    
    #include "CoreMinimal.h"
    #include "UObject/Object.h"
    #include "UObject/ObjectMacros.h"
    #include "NativeBase.generated.h"
    
    /**
     * 
     */
    UCLASS(Blueprintable, EditInlineNew)
    class LYRAGAME_API UNativeBase : public UObject
    {
    	GENERATED_BODY()
    
    public:
    	UNativeBase();
    
    	UPROPERTY(EditAnywhere)
    	int32 InheritedProperty;
    };
    
    // NativeBase.cpp:
    #include "NativeBase.h"
    
    UNativeBase::UNativeBase()
    {
    	InheritedProperty = 2;
    }
    
  2. Recompile and launch Lyra editor.
  3. Create a new BP class based on 'NativeBase' (BP_Base).
  4. Create another new BP class based on 'BP_Base' (BP_Child).
  5. Open 'BP_Base' for edit, and change 'InheritedProperty' to '4'.
  6. Add a new variable of type 'BP_Child' (object ref).
  7. Compile and save BP_Base.
  8. Open BP_Child, and note that 'InheritedProperty' is also '4' (i.e. its inherited from BP_Base).
  9. Re-launch the editor and open BP_Child. This does a "normal" synchronous asset load. Note that 'InheritedProperty' is still '4' (expected).
  10. Navigate to Lyra's GameplayCueNotifies folder, and open one of the GCN_* assets (e.g. GCN_Test_Burst). Locally mark as writable for testing.
  11. Add a new variable of type 'BP_Base' and save. This establishes a ref to a BP asset w/ a circular dependency, in an asset that will be async loaded at editor launch.
  12. Re-launch the editor and open BP_Child. Note that 'InheritedProperty' is now '2' (i.e. it's no longer inheriting it from BP_Base).
    Expected result: 'InheritedProperty' always inherits its parent class default value ('4' in this case).
Callstack

N/A

Have Comments or More Details?

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

4
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions5.1
Target Fix5.2
Fix Commit24434606
Main Commit24471344
Release Commit24468385
CreatedJan 27, 2023
ResolvedFeb 27, 2023
UpdatedNov 8, 2023