Description

A licensee has found that marking an FSoftObjectPath property as Config and Untracked causes the untracking metadata to be ignored.

This is because FSoftObjectPathThreadContext::GetSerializationOptions() ends up getting a null archive passed to it, and the Untracked metadata test is only made inside an if (Archive) block, where the property pointer gets pulled from the archive.

The Config init path goes through USoftObjectProperty::ImportText_Internal(), where the GetLinker() call is the source of the null archive pointer.

While researching this, it seemed that any softobjectptr property initialised via Config suffers from the same problem, even if the property itself is not marked Config, e.g. a UPROPERTY(Config) TArray<FSomeStruct>, where FSomeStruct contains a UPROPERTY(meta=(Untracked)) FSoftObjectPtr.

My guess is that a property pointer needs to be passed all the way down to FSoftObjectPathThreadContext::GetSerializationOptions() instead of being pulled from the archive.

Steps to Reproduce

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-73315 in the post.

0
Login to Vote

Won't Fix
ComponentUE - Foundation - Core
Affects Versions4.21
CreatedApr 25, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021
View Jira Issue