Skip to content

Commit 6aa7514

Browse files
committed
fix: bug fix for remote tick, when absent. Also removes commented code
1 parent a72e6f9 commit 6aa7514

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

com.unity.multiplayer.mlapi/Runtime/NetworkedVar/NetworkedVar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public T Value
9696
{
9797
// Setter is assumed to be called locally, by game code.
9898
// When used by the host, it is its responsibility to set the RemoteTick
99-
RemoteTick = 0;
99+
RemoteTick = TickSystem.k_NoTick;
100100

101101
isDirty = true;
102102
T previousValue = InternalValue;

testproject/Assets/Scripts/SyncTransform.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using MLAPI.Logging;
21
using MLAPI.NetworkedVar;
32
using UnityEngine;
43

@@ -50,7 +49,6 @@ void SyncPosChanged(Vector3 before, Vector3 after)
5049
{
5150
gameObject.transform.position = after;
5251
}
53-
//Debug.Log("[1] received position from " + before + " to " + after);
5452
}
5553
}
5654

@@ -68,7 +66,6 @@ void SyncRotChanged(Quaternion before, Quaternion after)
6866
{
6967
gameObject.transform.rotation = after;
7068
}
71-
//Debug.Log("[2] received rotation from " + before + " to " + after);
7269
}
7370
}
7471

@@ -118,10 +115,6 @@ void FixedUpdate()
118115
{
119116
gameObject.transform.position = m_PosStore[1];
120117
}
121-
122-
var after = gameObject.transform.position;
123-
124-
//Debug.Log("[3] Updated position from " + before + " to " + after);
125118
}
126119

127120
if (m_RotTimes[0] >= 0.0 && m_RotTimes[1] >= 0.0)
@@ -142,10 +135,6 @@ void FixedUpdate()
142135
{
143136
gameObject.transform.rotation = m_RotStore[1];
144137
}
145-
146-
var after = gameObject.transform.rotation;
147-
148-
//Debug.Log("[4] Updated rotation from " + before + " to " + after);
149138
}
150139
}
151140
}

0 commit comments

Comments
 (0)