using Unity.Netcode; using UnityEngine; [System.Serializable] public struct RopeState : INetworkSerializable { public int tick; public NetworkRope nrope; public Vector3[] playerPositions; public override int GetHashCode() { return tick; } public override bool Equals(object obj) { GameState other = (GameState) obj; return this.GetHashCode() == obj.GetHashCode(); } public void NetworkSerialize(BufferSerializer serializer) where T : IReaderWriter { serializer.SerializeValue(ref tick); nrope.NetworkSerialize(serializer); } }