Empty commit for d3d3113f7b
* Actions perform a lot better than UnityEvents.
* This allows callbacks to be passed into classes within the transports without depending on unity
BREAKING CHANGE: Transports now uses callbacks instead of UnityEvents
Mirror side:
old: transport.OnClientConnected.addListener(OnConnect)
new: transport.OnClientConnected = OnConnect;
Transports side:
callbacks have same name has the events so they can still be called using `OnClientConnected.Invoke`
* checking buffer length is atleast 2
disconnect if invalid message
* using const instead of magic number
Adding test to make sure that writing id is the same size as IdSize
* adding comment
* renaming to HeaderSize
* delegate and callbacks instead of unityevent
* using callbacks in Mirror
* Using new callbacks instead of events
* moving methods next to each other in NetworkClient
* moving add/remove to methods in NetworkServer
* replacing uses of events within transports and tests
* fixing tests
* fixing more tests
* replacing delegates with actions
* adding comments to show what action variable's are
* removing extra function created in rebase
* renaming callbacks
* adding reset methods so that actions arn't null
* fixing rename
* breaking defines
* Update Assets/Mirror/Runtime/Transport/KCP/MirrorTransport/KcpTransport.cs
* Update KcpTransport.cs
* Update Transport.cs
* removing ResetHandlers methods
transports can now call events after stop is called
Co-authored-by: vis2k <info@noobtuts.com>
* adding try/catch to hanlder
user code can throw errors.
* Update Assets/Mirror/Runtime/MessagePacker.cs
* Update Assets/Mirror/Runtime/MessagePacker.cs
* test for command that throws
* disconnecting client after Exception in message handler
Co-authored-by: vis2k <info@noobtuts.com>
Generating readers and writers for structs in other assemblies
could sometimes cause a
```
System.ArgumentException: Member 'xxx' is declared in another module and needs to be imported
```
This in particular affected unity mathematics.
fixes#2406
* Round trip time bool and tooltip.
I've added this RTT boolean and a tooltip, might clear up some confusion for future users.
Many believe ping is time to server, and rtt is ping pong.
* Round trip time bool and tooltip.
I've added this RTT boolean and a tooltip, might clear up some confusion for future users.
Many believe ping is time to server, and rtt is ping pong.
* Round trip time bool and tooltip.
I've added this RTT boolean and a tooltip, might clear up some confusion for future users.
Many believe ping is time to server, and rtt is ping pong.
* Round trip time bool and tooltip.
I've added this RTT boolean and a tooltip, might clear up some confusion for future users.
Many believe ping is time to server, and rtt is ping pong.