-
Notifications
You must be signed in to change notification settings - Fork 459
fix: issue #1151 - client RPCs invoked in OnNetworkSpawn being dropped #1218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
continue; | ||
} | ||
|
||
Debug.Log($"Sending {typeof(TMessageType)} to {clientId}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this got added by mistake? As it's quite spammy I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, 1 small debug log which should be removed (I think) that I pointed out.
# Conflicts: # testproject/Assets/Tests/Runtime/Support/SpawnRpcDespawn.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever! :)
Closing this because when working on another issue, I realized this needs a fundamentally different approach. I'll reopen later. |
…g dropped" This reverts commit d7d7bd7. # Conflicts: # com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs # testproject/Assets/Tests/Runtime/MessageOrdering.cs # testproject/Assets/Tests/Runtime/Support/SpawnRpcDespawn.cs
…d before the object is spawned.
com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me... again! :)
GetComponent<NetworkObject>().Spawn(); | ||
IncrementUpdateCount(); | ||
GetComponent<NetworkObject>().Despawn(false); | ||
Destroy(gameObject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about this change. Is this needed for this fix or an unrelated behaviour change. It's quite likely to be a better idea to destroy, but I wonder if it is part of the fix.
…ager.cs Co-authored-by: M. Fatih MAR <[email protected]>
…Spawn being dropped (Unity-Technologies#1218) * fix: issue Unity-Technologies#1151 - client RPCs invoked in OnNetworkSpawn being dropped
No description provided.