mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Comments
This commit is contained in:
parent
035afd140e
commit
60a186c5f2
@ -291,10 +291,11 @@ internal struct ReusableNetworkId
|
|||||||
|
|
||||||
internal static uint GetNextNetworkId()
|
internal static uint GetNextNetworkId()
|
||||||
{
|
{
|
||||||
|
// Older Unity versions don't have TryPeek.
|
||||||
if (reuseNetworkIds && netIdQueue.Count > 0 && netIdQueue.Peek().timeAvailable < NetworkTime.time)
|
if (reuseNetworkIds && netIdQueue.Count > 0 && netIdQueue.Peek().timeAvailable < NetworkTime.time)
|
||||||
{
|
{
|
||||||
ReusableNetworkId entry = netIdQueue.Dequeue();
|
ReusableNetworkId entry = netIdQueue.Dequeue();
|
||||||
//Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, $"[GetNextNetworkId] Reusing NetworkId {entry.poolNetId}.");
|
//Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, $"[GetNextNetworkId] Reusing NetworkId {entry.reusableNetId}.");
|
||||||
return entry.reusableNetId;
|
return entry.reusableNetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user