Skip to content

Commit 919302b

Browse files
committed
Add inlining and code docs
1 parent 7bb6e7e commit 919302b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Runtime.CompilerServices;
23
using UnityEngine;
34

45
namespace Unity.Netcode
@@ -336,7 +337,11 @@ public bool CanClientWrite(ulong clientId)
336337
return clientId == m_NetworkBehaviour.NetworkObject.OwnerClientId;
337338
}
338339
}
339-
340+
/// <summary>
341+
/// Catches if the current <see cref="NetworkManager.LocalClientId"/> is not valid to write to this variable.
342+
/// </summary>
343+
/// <returns>false if the current <see cref="NetworkManager.LocalClientId"/> can write to this variable, true otherwise</returns>
344+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
340345
internal bool LocalClientCannotWrite()
341346
{
342347
return m_NetworkManager && !CanClientWrite(m_NetworkManager.LocalClientId);

0 commit comments

Comments
 (0)