* Fixes 2 bugs:
NetworkServer.cs was not clearing connections on stopping. This meant when then starting again it was trying to communicate with old connections. Simply clear the list in DisconnectAllConnections. Also put in InternalListen for just in case as there should never be any connections at that point.
NetworkClient.cs was unable to load the scene on connect under certain circumstances. This was because NetworkClient.pauseMessageHandling had been set to false on a previous failed connection attempt. On a subsequent connect it would then never accept messages after it connected successfully so didnt know to load the scene. Simple fix to set NetworkClient.pauseMessageHandling to false when connecting. It should never be true at this point.
* split 2 fixes into 2 branches
NetworkClient.cs was unable to load the scene on connect under certain circumstances. This was because NetworkClient.pauseMessageHandling had been set to false on a previous failed connection attempt. On a subsequent connect it would then never accept messages after it connected successfully so didnt know to load the scene. Simple fix to set NetworkClient.pauseMessageHandling to false when connecting. It should never be true at this point.
When we try to generate a reader for a class that references itself, we have infinite recursion and editor crash
This PR stops the infinite recursion and displays an error instead just like with writers
* Fix issue #75, determining the command target
If you add the same networkbehavior twice to a gameobject, only the commands in the first one work.
This can also happen if you have a base class, you inherit it, and you add more than one of the inherited classes to the same gameobject.
* Improve error message
* Fix issue #75 for all RPC methods
* Fix formatting consistency
* Fix build, replace logDebug with Debug
* Use new NetworkBehaviours cache
* Use FindIndex instead than for loop
* No need for local variable
* use int instead of byte for simplicity
* component index are int now
It was assumed that CacheBehaviours was called to set m_NetworkBehaviours
With this change, the dependency is no longer there, the behaviours are simply cached the first time they are used