Description

Right now USoftObjectProperty does not implement NetSerializeItem so it falls back to the implementation in UObjectPropertyBase. This only works correctly if the object happens to be in memory, otherwise it will replicate it as null. It needs to replicate the path as a string instead, which will handle both loaded and unloaded objects.

This has come up a few times from licensees such as https://udn.unrealengine.com/questions/449760/tsoftobjectptr-will-fail-to-replicate-if-object-is.html

Steps to Reproduce
  1. Create a Replicated TSoftObjectPtr/TSoftClassPtr property in a replicated actor (either native or BP as Soft Object Reference)
  2. At runtime set the ptr to an unloaded object path on the server (it doesn't have to be a real object, so /game/test.test will be fine), this will cause it to replicate to the client
  3. On the client, call ToString on the softclassptr, it will return "" instead of what you set in #2.

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.21
Target Fix4.22
Fix Commit4600411
Main Commit4736445
Release Commit4862694
CreatedNov 27, 2018
ResolvedNov 28, 2018
UpdatedFeb 12, 2019
View Jira Issue