Skip to content

Conversation

ShadauxCat
Copy link
Collaborator

No description provided.

continue;
}

Debug.Log($"Sending {typeof(TMessageType)} to {clientId}");
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, removed.

Copy link
Contributor

@LukeStampfli LukeStampfli left a 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.

Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever! :)

@ShadauxCat
Copy link
Collaborator Author

Closing this because when working on another issue, I realized this needs a fundamentally different approach. I'll reopen later.

@ShadauxCat ShadauxCat closed this Oct 5, 2021
…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
Copy link
Contributor

@0xFA11 0xFA11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still LGTM 🚀

Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a 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);
Copy link
Contributor

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.

@andrews-unity andrews-unity merged commit 40011ed into develop Oct 8, 2021
@andrews-unity andrews-unity deleted the fix/rpcs-on-network-spawn branch October 8, 2021 20:54
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…Spawn being dropped (Unity-Technologies#1218)

* fix: issue Unity-Technologies#1151 - client RPCs invoked in OnNetworkSpawn being dropped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants