You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/NetworkVariable/AnticipatedNetworkVariable.cs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,11 @@ public T AuthoritativeValue
259
259
260
260
privateSmoothDelegatem_SmoothDelegate=null;
261
261
262
+
/// <summary>
263
+
/// Initializes a new instance of the AnticipatedNetworkVariable class
264
+
/// </summary>
265
+
/// <param name="value">The initial value for the network variable. Defaults to the type's default value if not specified.</param>
266
+
/// <param name="staleDataHandling">Determines how the variable handles authoritative updates that are older than the current anticipated state. Defaults to StaleDataHandling.Ignore.</param>
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariable.cs
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ public void Reset(T value = default)
106
106
// The introduction of standard .NET collections caused an issue with permissions since there is no way to detect changes in the
107
107
// collection without doing a full comparison. While this approach does consume more memory per collection instance, it is the
108
108
// lowest risk approach to resolving the issue where a client with no write permissions could make changes to a collection locally
109
-
// which can cause a myriad of issues.
109
+
// which can cause a myriad of issues.
110
110
privateprotectedTm_InternalOriginalValue;
111
111
112
112
privateprotectedTm_PreviousValue;
@@ -151,11 +151,12 @@ public virtual T Value
151
151
/// Invoke this method to check if a collection's items are dirty.
152
152
/// The default behavior is to exit early if the <see cref="NetworkVariable{T}"/> is already dirty.
153
153
/// </summary>
154
+
/// <param name="forceCheck"> when true, this check will force a full item collection check even if the NetworkVariable is already dirty</param>
155
+
/// <returns>True if the variable is dirty and needs synchronization, false if clean or client lacks write permissions</returns>
154
156
/// <remarks>
155
157
/// This is to be used as a way to check if a <see cref="NetworkVariable{T}"/> containing a managed collection has any changees to the collection items.<br />
156
158
/// If you invoked this when a collection is dirty, it will not trigger the <see cref="OnValueChanged"/> unless you set forceCheck param to true. <br />
157
159
/// </remarks>
158
-
/// <param name="forceCheck"> when true, this check will force a full item collection check even if the NetworkVariable is already dirty</param>
0 commit comments