Description

User reported that Soft Object Pointers may not fire RepNotifies properly.
This is likely also the case with Weak Object Pointers (and other similar wrappers).

The main problem is that these all get bundled as ObjectProperties, and RepLayout has custom logic which will attempt to resolve the Object before comparing pointers.

This means that for Soft Object Pointers, when a given object isn't loaded yet (due to Level Streaming, haven't been explicitly loaded, etc.), the resolved object will always be null. So, even if two Soft Object Pointers don't point to the same object, if neither object has been loaded they will both resolve to Null and won't fire a RepNotify that is not marked as "Always" fire.

Steps to Reproduce

See UDN for context.

  1. Create a new Actor that's replicated.
  2. Add a Soft Object Pointer property to the actor. Make the property replicated with a RepNotify.
  3. Point the Soft Object Pointer to some asset that is not loaded as the default.
  4. In BeginPlay, on the Authority Machine, change the Soft Object Pointer to a different asset that's not loaded.

Expected:
When the property is changed, it will be replicated and trigger the RepNotify regardless of whether or not the objects are loaded.

Actual:
When changing the value between multiple unloaded assets, the property will not replicate or trigger rep notifies.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Networking
Affects Versions4.22.0
Target Fix4.24
Fix Commit8641675
CreatedMay 3, 2019
ResolvedSep 11, 2019
UpdatedFeb 26, 2020
View Jira Issue