* fix(NetworkServer): Improve Warnings
- Attempt to dig up the Object, component, and method name to make debugging easier
- Changes identity to identity.name so the object name is logged correctly.
* Update Assets/Mirror/Core/NetworkServer.cs
Co-authored-by: mischa <16416509+miwarnec@users.noreply.github.com>
* Update Assets/Mirror/Core/NetworkServer.cs
Co-authored-by: mischa <16416509+miwarnec@users.noreply.github.com>
* Use GetFunctionMethodName
* cleanup
---------
Co-authored-by: mischa <16416509+miwarnec@users.noreply.github.com>
* fix: NT-Unreliable Quaternion Compression Fix
Credits to ninja of course :D
* Client using server snapshots fix.
* Nothing to see here..
* Added comment to Quat Rotation Fix
- Same as NetworkServer...allows NetworkMessage handlers to have a channelId param
This is NetworkServer's version:
```cs
public static void RegisterHandler<T>(Action<NetworkConnectionToClient, T, int> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{
ushort msgType = NetworkMessageId<T>.Id;
if (handlers.ContainsKey(msgType))
{
Debug.LogWarning($"NetworkServer.RegisterHandler replacing handler for {typeof(T).FullName}, id={msgType}. If replacement is intentional, use ReplaceHandler instead to avoid this warning.");
}
// register Id <> Type in lookup for debugging.
NetworkMessages.Lookup[msgType] = typeof(T);
handlers[msgType] = NetworkMessages.WrapHandler(handler, requireAuthentication, exceptionsDisconnect);
}
```
No need to send the Trigger message back to the owner since we already called animator.SetTrigger
- RpcOnAnimationTriggerClientMessage
- RpcOnAnimationResetTriggerClientMessage
- added [KCP] to all log messages
- fix: #3704 remove old fix for #2353 which caused log spam and isn't needed anymore since the
original Mirror issue is long gone
- fix: KcpClient.RawSend now returns if socket wasn't created yet
- fix: https://github.com/MirrorNetworking/Mirror/issues/3591 KcpPeer.SendDisconnect now rapid
fires several unreliable messages instead of sending reliable. Fixes disconnect message not
going through if the connection is closed & removed immediately after.
* perf(Match Interest Mgmt) Use Dictionary instead of spawned
This is better than iterating all spawned objects and doing TryGetComponent in Update.
* undo rename
* Simplified OnRebuildObservers
* Overhauled Match Interest Mgmt
- no more looping dictionaries
- no more TryGetComponent in hot path
- NetworkMatch component drives the updates
* Cleanup
* syntax
* Merged UpdateDirtyMatches & UpdateMatchObjects into OnMatchChanged
* NetworkMatch - Added isServer check
* MatchInterestManagement: Better matchObjects cleanup
- moved match removal to LateUpdate
- added matchCount for debugging
* Added comment
Co-authored-by: Robin Rolf <imer@imer.cc>
* Formatting
Co-authored-by: Robin Rolf <imer@imer.cc>
* Updated OnMatchChanged / matchCount -> ushort
- Depends on ReadOnlyAttribute
* matchCount -> internal
* matchCount Header
---------
Co-authored-by: Robin Rolf <imer@imer.cc>