PCGLevelToAsset resets references to PCG Data Asset to transient object.

I’m having an issue with updating PCG Data Assets using the right click menu in a level file. References to the PCG Data Asset being updated can get lost if they are being used in the level that is currently open, or if they are referenced in a blueprint parent actor that is currently loaded.

I can’t reproduce this issue in the same way in 5.5 and it seems resolved in 5.7, so I’ll look at the differences in how PCGLevelToAsset handles this there, but I was keen to get info on how to best proceed.

Let me know if there’s anything missing from the repro steps.

thanks!

[Attachment Removed]

Steps to Reproduce

  • Create PCG Data Asset from a level file
  • Create Blueprint actor that has a PCG Data Asset variable. Add PCG Graph to blueprint that uses Get Actor Property to read the data asset and spawn its contents.
  • Drag blueprint actor into scene
  • Update PCG Data Asset by
    • dragging the level its made from into your current scene.
    • press “Edit” to update contents.
    • Save and bake into PCG Data Asset using the right-click menu -> Asset Actions -> Create PCG Data Asset from Level(s)
  • Observe that the exposed “PCG Data” variable is referencing a transient object (hovering over variable would show Engine/Transient as an object path)
  • If current scene is saved and reloaded in this state, reference to original PCG Data content asset would be lost.
    [Attachment Removed]

Hi,

we did track this internally as UE-315479 and it’s indeed been fixed for 5.7.

I’m afraid you won’t be able to avoid that when using the “Create PCG Data Asset from Level(s)” asset action, since the 5.6 logic for saving over a PCGData Asset always renames the existing ones into the transient package.

However, if you use the “Update PCG Assets” action by right-clicking on the Data asset instead of the level, then it should not use that logic and update it as expected.

Is that an option for you in 5.6?

Kind Regards,

Sebastian

[Attachment Removed]