* Added Layer Weight to NetworkAnimator
Now NetworkAnimator is aware of each layer weight on it's references
Animator and will sync layer weights across the network.
* NetworkAnimator layers Float equality fix
* Update Assets/Mirror/Components/NetworkAnimator.cs
Co-authored-by: James Frowen <jamesfrowen5@gmail.com>
* Update Assets/Mirror/Components/NetworkAnimator.cs
Co-authored-by: James Frowen <jamesfrowen5@gmail.com>
* Remove GetLayerWeight check every incoming packet as is extern call
Co-authored-by: James Frowen <jamesfrowen5@gmail.com>
* Adding asmdef to telepathy
mirror has to reference telepathy as it is the default transport
this also means that TelepathyTransport has to be in the mirror asmdef
* references telepathy in tests
* formatting asmdef
Note this method is being called in 3 places:
one in MessageClassProcessor and 2 in NetworkBehaviorProcessor.
The NetworkBehaviorProcess is really a don't care, this condition cannot happen since it would not be invoked unless the class extends from NetworkBehavior. In this case, it will always resolve.
but even if it does not resolve, they handle the null case gracefully by not calling the base method.
MessageClassProcessor also calls this method, and if it is null it does not call the base method. That is precisely the behavior we want to resolve#2117
so all 3 places are perfectly fine receiving null.
The only way to trigger the error was #2117
I renamed the method to make it clearer that this may not find the method in the parent class.
Instead of doing
```cs
[SyncEvent]
public event MySyncEventDelegate EventOnly;
```
You can now do
```cs
[SyncEvent]
public event MySyncEventDelegate Only;
```
We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.
Since the Command rewrite that allows virtuals, this is no longer
a problem. So we can drop this requirement.
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
Instead of doing
```cs
[ClientRpc]
public void RpcPepe() {}
```
You can now do
```cs
[ClientRpc]
public void Pepe() {}
```
We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.
Since the Command rewrite that allows virtuals, this is no longer
a problem. So we can drop this requirement.
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
Instead of doing
```cs
[TargetRpc]
public void TargetPepe() {}
```
You can now do
```cs
[TargetRpc]
public void Pepe() {}
```
We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.
Since the Command rewrite that allows virtuals, this is no longer
a problem. So we can drop this requirement.
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
Instead of doing
```cs
[Command]
public void CmdPepe() {}
```
You can now do
```cs
[Command]
public void Pepe() {}
```
We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.
Since the Command rewrite that allows virtuals, this is no longer
a problem. So we can drop this requirement.
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
* finding all fields
* adding test for message with base
* undoing FindAllPublicFields
* adding tests for Inheritance with define order
* making sure that messages are processed in order
do not need to check if message has already been processed becuase
OnSerialize is only added/changed if it is missing or empty
* removing un-needed comments
* using recursion instead of loops
* remove white space
* perf: Use invokeRepeating instead of Update
If you have low frequency calls, InvokeRepeating is a lot faster than
Update(). Use InvokeRepeating for NetworkProximityChecker
* Fix indentation
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
* weaver test for mutlitple events
* tests for multiple sync events in 1 class
* removing break so that multiple events will be proccessed
It seems like this break was here because unet used foreach CustomAttributes
but mirror uses GetCustomAttribute
* test to check if fallbacks disables other transport
* using ondisable to disable other transport
* fixing teardown
* adding test for Multiplex
* using ondisable to disable other transport
* fixing NSubstitute for 2019
* fixing pong spawn points
* renaming files and asmdef
* More Cloud examples
* Moving pong example to cloud folder
* Moving shared code to GUI folder
* Adding readme for examples
* Adding tank example
* adding mirror list services
* fixing code smells
* removing runtime example folders
* removing matchmaking code till feature is ready
* fixing scene path
* updating readme to say where example is
* fix: Websockets Transport now handles being disabled for scene changes
* Removed unused method
* Removed test warnings
* Changed back to await Task.Run
* adding queue to ClientJs
keeping standalone client without queue
dont need common class for now as that over complicates the fix
Co-authored-by: Chris Langsenkamp <chris@clevertech.net>
* adding override method that calls base
* trying to debug instruction for call to base
* extra tests
* adding tests for client and target Rpc
* adding fix for calls to base class
Since networkbehaviour parents are processed first we can just fix the
method when we see it in SubstituteMethod
* moving static code from NetworkBehaviour to its own class
* Replacing calls in tests to use new RemoteCallHelper
* updating references to types in weaver
* adding version 15 defines
* renaming function
* moving exists check to its own function
* moving order and adding whitespace
* adding SenderConnection Attribute
* adding weaver tests for SenderConnection Attribute
* tests for sender connection
* updating valid method to work with sender connection
* using RemoteCallType in read write calls
* adding sender connection to CallCmd
* updating CmdDelegate
* adding NetworkConnection to invokeFunction
* updating old tests
* removing SenderConnectionAttribute
* typo
* adding version 14 defines
* allowing assetId to be set at runtime
* removing ignore from tests
* adding errors and warning for settings assetId
* adding tests for settings assetId
* not allowing assetId to be replaced
* fixing test
* giving error when old assetId was not empty
* moving test to runtime
moving base classes to common
* moving more tests to runtime
* changing tests to give error when assetid is changed
* removing un-needed check
* removing NewAssetId tests
* WIP
* WIP
* WIP
* WIP
* feat: Add excludeOwner option to ClientRpc
* removed default value
* Fixed tests
* Update Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* adding weaver test for exlude owner
* adding test for call to exclude owner
* adding comment back
* removing ClientRpcInfo
we don't need ClientRpcInfo as client rpc is only called server side
so we don't need to double check exlucde owner, weaver can handle it
* removing extra register
* fixing test compile errors
* Update Assets/Mirror/Tests/Editor/Weaver/WeaverClientRpcTests~/ClientRpcThatExcludesOwner.cs
* doc: fixed typos in readme
* doc: Updated ChangeLog
* doc: Updated docs for Command ignoreAuthority option
* doc: Updated ChangeLog
* fixing typo in comment (#1963)
* Removed YouTube link. Link is changing soon. (#1962)
* Removed YouTube link. Link is changing soon. (#1961)
* Removed YouTube link. Link is changing soon. (#1960)
* Removed YouTube link. Link is changing soon. (#1959)
* Removed YouTube link. Links are changing. (#1958)
* Removed YouTube link. Links are changing. (#1957)
* Update NetworkBehavior.md (#1956)
* fixed comment typo
* doc: Updated Migration guide example
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Co-authored-by: FirstGearGames <firstgeargames@gmail.com>
* weaver test for virtual and abstract commands
* adding error for abstract methods
* adding base class for command tests and renaming file
* adding tests for virutal commands
* renaming classes to make more sense
* removing whitespace
* adding tests for Client Target Rpc too
* fixing compile error
* fixing message and typo
* removing line
* renaming namespace and base class to be used by Rpc
* tests for calling Rpc
* tests for virtual rpc
* fixing typo
* white space
* renaming parameter name
* renaming parameter name
* making comment look the same as the one in writeArguments
* removing NetworkBehaviourType2 to make code simplier
* whitesapce
* adding virtual function for Players not ready
* moving function calls to property
* making if check easier to read
* setting field
* making field private
* removed blank line
* Added override to template
* doc: Updated ChangeLog
Co-authored-by: Chris Langsenkamp <chris@clevertech.net>
* fixing the TargetRpc Test class
moving SyncEvent Tests to their own folder
renaming tests to be readable
* removing meta file from csproj
* fixing typo
* sync event tests
* fixing typo
* fixing typo
* fixing errors in tests
* fixing name in test message
* error for first param not NetworkConnection for targetRpc
* adding error if no paremeters
* add health lives and score to Tank
* add damage and a source object to projectile
* update prefabs to use new vars
* add gamecontroller to manage state and UI
* update scene to use new gamecontroller and ui
* retag as player
* code cleanup
* replaced GameController with a custom NetMan
* removed lives and respawning. added state management
* scene and prefab updates
* fix billboarding for player names
* fix: cant win game when alone
* darker menu colors
* Added SyncList.RemoveAll and unit test.
* Added RemoveAllNone unit test for SyncList
* SyncList.RemoveAll cleanup
* RemoveAll no longer calls collections .Add
Unit tests for SyncList.RemoveAll now check clientSyncList.
* add logger to all classes that have logging but no logger
have not updated all of the debugs in the classes yet as the logger implementation has still not been decided.
* add logger to all classes that were missed
* update logger refs in BasicAuthenticator
* update logger refs in TimeoutAuthenticator
* update logger refs in NetworkAnimator
* update logger refs in NetworkRoomManager
* update logger refs in NetworkRoomPlayer
* update logger refs in NetworkSceneChecker
* update logger refs in AdditiveNetworkManager
* update logger refs in ZoneHandler
* update logger refs in ChatWindow
* update logger refs in ListServer
* update logger refs in Reward
* update logger refs in Reward
* update logger refs in NetworkRoomPlayerExt
* update logger refs in LocalConnections
* update logger refs in MessagePacker
* update logger refs in NetworkBehaviour
* update logger refs in NetworkManager
* update logger refs in NetworkReader
* update logger refs in NetworkReaderPool
* update logger refs in NetworkServer
* update logger refs in NetworkTime
* update logger refs in NetworkWriter
* update logger refs in NetworkWriterPool
* update to use logger log enabled
* remove if logfilter debug as log is not concatenated
* add if logger enabled check to concatenated strings
* Update Assets/Mirror/Authenticators/BasicAuthenticator.cs
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* suggested fixes
* remove unused logger
* changed to warning
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* Removing host setup
Only set up the minimum in order to test a feature
* moving to new file
* inverting if
* removing extra line
* fixing test for headless
* fix ref to NetMan in Authenticator
* does not return
* added basic description of return conditions
* comment is 2 years old from HLAPI 2017.4 and no longer relevant
* remove empty whitespace
* Update Assets/Mirror/Runtime/NetworkConnection.cs
* Update Assets/Mirror/Runtime/NetworkServer.cs
* Update Assets/Mirror/Runtime/NetworkAuthenticator.cs
* Update Assets/Mirror/Runtime/NetworkServer.cs
* Update Assets/Mirror/Runtime/NetworkServer.cs
Co-authored-by: MrGadget <chris@clevertech.net>
* Moving code that draws the log levels to its own class
this allows other scripts to use the same code to draw the log levels
* adding LogSettings to store the log levels
* adding GUI method to create LogSettings
* Creating Editor for LogSettings that uses LogLevelsGUI
* adding helper to find Existing LogSettings
* Adding field to LogLevelWindow to use LogSettings
* Adding LogSettings to drawer and save on changed check
* fixing field default value of null so that c# compiler doesnt complain
* loading existing settings into LogFactory when the editor starts
* component to load log settings in a build
* changing namespace
* Moving logging scripts to subfolder
* NetworkLogSettings editor
Makes the component use the same gui as the Window and ScriptableObject
* Making NetworkLogSettings find existing settings on Reset
reset is called when component is added
* adding attributes
* adding docs
* adding icon
* doc.
* documentation and images
* fixing image extension
* Update Assets/Mirror/Runtime/Logging/EditorLogSettingsLoader.cs
Co-authored-by: vis2k <info@noobtuts.com>
Co-authored-by: vis2k <info@noobtuts.com>
* test for RegisterPrefab with handler
* comments
* finishing tests and ignore some cases
* updating checks and log messages
* more tests
* removing test cases
* fix: Deprecate RemovePlayerMessage As Security Risk
* Updated PreprocessorDefine
* Updating for changes in master
* Updating for changes in master
* Removed the error flag so tests could still pass
* adding assetId to prefab
* making sure NetworkManager is shutdown
* removing host set up for test that doesn't need it
* using OneTimeTearDown
* fixing performance test
* fix: #1659 Telepathy LateUpdate processes a limited amount of messages per tick to avoid deadlocks
* Update Assets/Mirror/Runtime/Transport/TelepathyTransport.cs
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* Update Assets/Mirror/Runtime/Transport/TelepathyTransport.cs
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* Replacing debug log with warning
Replacing a handler by mistake will lead to code not running when it is
expected to.
* adding ReplaceHandler methods
* improving warning messages
* using ReplaceHandler in networkManager
* fixing doc comments for RegisterHandler
* fixing doc comments for ReplaceHandler
* Update Assets/Mirror/Runtime/NetworkManager.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* improving doc comments
* improving doc comments for new code
* Update Assets/Mirror/Runtime/NetworkServer.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/NetworkClient.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
Co-authored-by: MrGadget <chris@clevertech.net>
* There's no need for handling scene ids at runtime.
* Adding tests for Instantiate On Scene object
* removing ExecuteInEditMode
none of our function do anything at edit time so removing this tag
* adding check to awake to stop Instantiate
* code style and comments
* using logger for new error
Co-authored-by: Chris Langsenkamp <chris@clevertech.net>
* Remove redundant check, can be done once in setup
* Update Assets/Mirror/Tests/Editor/Weaver/WeaverNetworkBehaviourTests.cs
* Update Assets/Mirror/Tests/Editor/Weaver/WeaverTests.cs
Co-Authored-By: James Frowen <jamesfrowendev@gmail.com>
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* feat: Disconnect Dead Clients
* Moved code to NetworkConnectionToClient
* Fixed type
* WIP
* Trying to solve the mystery of the Host
* Updated Example
* fixed comment whitespace
* Final Cleanup and Unit Test
* Removed extra warning
* Reverted change to scene file
* Changed to Play test, still not working
* Added NetworkServer.Update time loop
* Removed commented code
* fixed comment
* Filled in ServerDisconnect so it behaves as expected.
* fixed comment
* Renamed to bool IsClientAlive
* Should be greater than
* Added override that shouldn't be necessary.
* changed asserts per Paul
* Flipped < back
* Shortened test time
* Corrected comment
* Lost the 1
* Updated NetworkServerTest
* Update Assets/Mirror/Tests/Runtime/NetworkServerTest.cs
* Added bool checkInactiveConnections
* Tests for sync dictionary and sync set (#1753)
* sync dictionary tests
* rename
* changing error message
* sync set tests
* silence unused method warning
* test class name matches file name
* test class name matches file name
* test class name matches file name
* test class name matches file name
* test class name matches file name
* test class name matches file name
* test class name matches file name
* Scope syncdict tests to their classes
* Scope synclists tests to their classes
* Scope syncset tests to their classes
* test class name matches file name
* Scope sample classes
* test class name matches file name
* fix: call the virtual OnRoomServerDisconnect before the base
* fixed name
* doc: Updated docs
* Moved serverIdleTimeout to NetworkManager
* fixed test to enable disconnectInactiveConnections
* Copied disconnectInactiveConnections & serverIdleTimeout to NetworkServer
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Co-authored-by: Paul Pacheco <paulpach@gmail.com>
* Tests for most uses of sync list
renaming classes for existing test files
* improving error message for Paramless constructor
* More tests for SyncLists
* updating error message
* ignore abstract classes
we dont need to process abstract classes because classes that
inherit from them will be processed instead
* check and error for syncList item being genric
* allowing extra base types for synclist
* checking for nested types in abstract classes
* test for nested types inside structs