Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question "PredictionRigidbody" struct FishNet

Discussion in 'Multiplayer' started by Dijkstra1219, Apr 28, 2024.

  1. Dijkstra1219

    Dijkstra1219

    Joined:
    Nov 25, 2023
    Posts:
    1
    I'm working with the current version of FishNet. I'm trying to use Prediction v2 but I don't have the PredictionRigidbody struct. Unity tells me that no such struct exists


    Code (CSharp):
    1. public struct ReconcileData : IReconcileData
    2. {
    3.  
    4.     public RigidbodyState RigidbodyState;
    5.     public PredictionRigidbody PredictionRigidbody;
    6.  
    7.     public ReconcileData(PredictionRigidbody pr)
    8.     {
    9.         RigidbodyState = new RigidbodyState(pr.Rigidbody);
    10.         PredictionRigidbody = pr;
    11.         _tick = 0;
    12.     }
    13.  
    14.     private uint _tick;
    15.     public void Dispose() { }
    16.     public uint GetTick() => _tick;
    17.     public void SetTick(uint value) => _tick = value;
    18. }