* FAQ How to get player count?
* Update FAQ.md
* Update FAQ.md
* Adjusted clarity for example scripts.
Made the code snippets easier to understand based on feedback.
* Update FAQ.md
* Update FAQ.md
Co-authored-by: vis2k <info@noobtuts.com>
this avoids the first line of the stacktrace being on the same line as the Exception. this is better because the Exception line could be line and it is easy to miss the first stack trace line.
* moving FindPath to editor scripts
this allows this function to be used by other scripts
* Update Assets/Mirror/Editor/EditorHelper.cs
* removing extra using
* fix: prevent allocation of massive array
A poison message could contain an invalid length causing us to allocate massive arrays
* throw exception instead
* Update Assets/Mirror/Runtime/NetworkReader.cs
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* test for ReadArray
* swapping order of equation so that length doesnt overflow
* adding test case
* adding more tests for array length
* swapping order
* fixing expected message
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Unity has added new private LogWarning methods in 2020.2 which causes weaver to find the wrong method. Checking the parameters as we as the name will find the correct method.
fixes: https://github.com/vis2k/Mirror/issues/2366
* adding MakeGeneric method
* adding tests for NB syncvar+hook
* adding functions to NetworkBehaviour
* getting references to new functions
* fixing NB read so it always reads same number of bytes as write
* adding backing field and serialize for Nb Syncvar
* extra test
* adding ignore to transform test
* fixing test
Seems like this has come up a few times so here is a commit to sort this out.
We shouldn't have to worry about the order of the using, we should just let plugins automatically sort them. They are sorted into alphabetical order expect for system becase we have `dotnet_sort_system_directives_first = true` enabled in `.editorconfig`
* fix: stopping values being reset before OnDestory is called
* matches server side logic
* if an object is being fully destroyed it doesn't need its values to be reset
* adding read/write functions
* adding method to get WriteNetworkBehaviour
* adding methods to weavertypes
* adding method to get ReadNetworkBehaviour
* weaver test for NetworkBehaviour in RPC
* renaming var
* writing tests to make sure read/write works
* registering functions
* changing function and adding comment
* checking any writer is set
* adding Description to test
* collection test
* fixing call
* removing errors, networkbehaviour as read/write
* adding test to use the reader that weaver generates
* fixing import
* simplifying test
* removing null from spawned
* improving throw
* adding code coverage
* applying code suggestions