fix(NetworkClient): InvokeIdentityCallbacks call OnStartClient first (#3884)

- This is for host client to match logical call order as remote client
This commit is contained in:
MrGadget 2024-08-10 05:39:03 -04:00 committed by GitHub
parent c77d8459fb
commit 46010ca49c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1493,12 +1493,12 @@ static void InitializeIdentityFlags(NetworkIdentity identity)
// cleaner, and some places need to set flags first.
static void InvokeIdentityCallbacks(NetworkIdentity identity)
{
// invoke OnStartAuthority
identity.NotifyAuthority();
// invoke OnStartClient
identity.OnStartClient();
// invoke OnStartAuthority
identity.NotifyAuthority();
// invoke OnStartLocalPlayer
if (identity.isLocalPlayer)
identity.OnStartLocalPlayer();