- No longer passes `NetworkConnection` on Client
- Use `NetworkClient.connection` within your event hanlder
This is only breaking for users that assigned their own events to OnClientAuthenticated in the inspector. Everything else related to an Authenticator works the same with no changes needed because nearly all Authenticator mechanisms are private.
Deprecating would be worse than not in this case, since custom user-made handers would be the far uncommon case as far as I know.
* breaking: Remove Obsoletes
- MIRROR_47_0_OR_NEWER symbol added
- A few obsoletes with Network Visibility remain...not ready to remove just yet.
* fixed test
As was done in other areas, now using `NetworkClient.connection` instead of passing a `conn` parameter around.
- Abstract NetworkAuthenticator now has obsoletes.
- Basic and Timeout Authenticators Updated
- Network Manager Updated
- Script Template Updated
* breaking: no need to override Serialize/Deserialize in messages
Messages no longer serilize themselves. This has been decoupled. Serializing a message is now done
via readers and writers, which can be either generated or user provided.
This lifts some restrictions,
* you no longer need to have a default constructor in messages
* Messages types can be recursive
* struct Messages don't need to provide an empty Serialize and Deserialize method
Before:
```cs
public struct ReadyMessage : IMessageBase
{
public void Deserialize(NetworkReader reader) { }
public void Serialize(NetworkWriter writer) { }
}
```
After:
```cs
public struct ReadyMessage : IMessageBase
{
}
```
BREAKING CHANGE: Messages must be public
BREAKING CHANGE: Use custom reader and writer instead of Serialize/Deserialize methods
* Remove unused method
* remove unused methods
* remove unused methods
* make all messages struct
* Fix test code generator
* Get rid of MessageBase
* Rename IMessageBase -> NetworkMessage
* add MessageBase as obsolete
* Use a default request
* Empty file to make asset store happy
* Apply suggestions from code review
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
* 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>
* Component-based Authentication
* Capitalized IsAuthenticated
* Added isAuthenticated to NetworkConnection
* Removed activeAuthenticator as unnecessary
* Removed unnecessary using
* Added more comments
* Documentation
* Added cs to code blocks in doc
* fixed typo in doc
* Doc improvements
* Fixed another typo in doc
* Removed HideInInspector
* Updated doc and image
* Fixed comment
* Added inspector header and tooltips
* Fixed typo
* Add AuthenticationData object
* Add a bullet point in the doc about AuthenticationData
* Updated screenshot image
* Added HelpURL attribute
* Added Initializers for both Server and Client
* Fixed doc grammar and phrasing
* Forgot to add the ClientInitialize in StartHost
* Updated doc with info about the initializers
* Changed initializers from bool to void.
* Eliminated the abstract model and renamed to NetworkAuthenticator and made all methods virtual
* Fixed comment
* Fixed typo
* Doc cleanup
* Doc Cleanup
* authenticator RemoveAllListeners in StopServer and StopClient
* Update Assets/Mirror/Runtime/NetworkManager.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Changes requested by Vis
* reverted conflicting change
* Revert "reverted conflicting change"
This reverts commit f65870e073.
* UnityEditor.Undo.RecordObject
* made the name camelCase
* Added internal methods and On prefix to methods
* Reverted this change so it can be done in a separate PR
* Moved authenticator calls to after runInBackground
* Add built-in timeout feature
* Changed UnityEditor.Undo.RecordObject to use gameobject
* Convert to Abstract, add Basic Authenticator, update docs.
* Removed timeout, against my better judgement.
* Removed the rest of timeout, still against my better judgement
* Fixed event listener mappings
* Renamed and consolidated methods
* updated doc and image
* made OnClientAuthenticate and OnServerAuthenticate abstract
* Updated Debug log msgs
* changed to authenticator != null
* Renamed to NetworkAuthenticator