Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

RepNotifies with parameters can have different values supplied compared to native Unreal #1835

Open
mironec opened this issue Feb 25, 2020 · 0 comments

Comments

@mironec
Copy link
Contributor

mironec commented Feb 25, 2020

Description

In Unreal, when you specify a RepNotify variable with the OnRep function accepting an argument, Unreal passes the old value of the variable as the argument. This old value supplied can differ between native Unreal and Spatial. Specifically in the case of complex replicated properties (e.g. structs, TArrays, etc.).

Expected behavior

Parity between native and Spatial.

Current behavior

The value supplied as an argument to the OnRepNotify function can be in an indeterminate and different state than in native for arrays and other complex types.

Possible solution

Will not fix, the state is indeterminate in native as well, and should not be relied on.

Steps to reproduce

  1. Create a replicated RepNotify TArray variable.
  2. In the OnRepNotify function, make sure that it has a TArray argument.
  3. Add a new entry to the array on the server and observe the OnRepNotify being called on the client with different values for native and spatial. Example: if the array starts out with [1,2], then the server adds 3, so it becomes [1,2,3]. The RepNotify is called with:
    a) On Native: OldValue = [1,2,0]
    b) On Spatial: OldValue = [1,2]

Environment

GDK 0.6, GDK 0.8, possibly later.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants