Prediction V2: Server-side input not working
When calling Replicate(IReplicateData) on the server, the data disappears. Replicate() only ever receives ReplicateState.Predicted and default data.
More information, a video example, and the project itself are in this repo: https://github.com/RyanGarber/FishNet-PV2/tree/main#server-input-bug
I made a quick change that is working in initial tests. If you would like to try it out further I'd be very appreciative...
open NetworkBehaviour.Prediction and modify the first few parts of this method as shown...
New
protected internal void Replicate_Owner<T>(ReplicateUserLogicDelegate<T> del, uint methodHash, List<T> replicatesHistory, T data, Channel channel) where T : IReplicateData
{
bool ownerlessAndServer = (!Owner.IsValid && IsServer);
if (!IsOwner && !ownerlessAndServer)
return;
Before
protected internal void Replicate_Owner<T>(ReplicateUserLogicDelegate<T> del, uint methodHash, List<T> replicatesHistory, T data, Channel channel) where T : IReplicateData
{
if (!IsOwner)
return;
Sorry for the late response; I was unable to test this until now. It appears to have fixed the issue in both the test project and in my production project. Thanks!