vis2k
17c343d28d
NetworkConnection.InvokeHandler: improve error message
2019-02-26 16:07:39 +01:00
vis2k
2f322c37fe
NetworkConnection: move InvokeHandler functions down to TransportReceive for better overview
2019-02-26 16:07:39 +01:00
vis2k
038f09de3f
NetworkConnection: remove unused InvokeHandler(NetworkMessage) function
2019-02-26 16:07:39 +01:00
vis2k
06a334e6dd
NetworkConnection.HandleBytes moved into TransportReceive
2019-02-26 16:07:39 +01:00
vis2k
f68119d614
LocalClient.Update uses OnDataReceived
2019-02-26 16:07:39 +01:00
vis2k
e605ec7251
NetworkClient.OnDataReceived made protected so it can be called from LocalClient
2019-02-26 16:07:39 +01:00
vis2k
cbc3c724c9
ClientScene.RegisterSystemHandlers: sort and add empty handlers to local client's handlers to avoid 'messageid not found' errors. This way we can reuse NetworkConnection.HandleBytes for local client without errors.
2019-02-26 16:07:39 +01:00
vis2k
29a95b33a1
NetworkConnection: move InvokeHandlers next to HandleBytes for a better overview
2019-02-26 16:07:39 +01:00
vis2k
2fcd0cac64
LocalClient packetQueue stores byte arrays and unpacks them in Update
2019-02-26 16:07:39 +01:00
vis2k
d86d9e3e87
m_internalmsgs renamed to packetqueue
2019-02-26 16:07:39 +01:00
vis2k
93e7da9b88
syntax
2019-02-26 16:07:39 +01:00
rodolphito
c931d03ae0
Simplified code a bit, and also removed allocation. ( #453 )
2019-02-26 08:21:43 -06:00
Paul Pacheco
58b7126f0b
Use Length instead of position for getting the written data ( #449 )
...
* Use Length instead of position for getting the written data
* Update NetworkBehaviour.cs
2019-02-26 14:54:41 +01:00
vis2k
7109be3c1c
move ProcessInternalMessages to Update
2019-02-26 09:09:55 +01:00
vis2k
b0da7f8b0f
syntax
2019-02-26 09:03:00 +01:00
vis2k
48e08bdd05
no need for extra variable
2019-02-26 09:02:37 +01:00
vis2k
f1e3c6f8fd
syntax
2019-02-26 09:02:12 +01:00
vis2k
0cdaaecd3a
avoid shadowing member
2019-02-26 09:02:02 +01:00
vis2k
c7524cb7f1
NetworkClient.Update: remove unnecessary checks
2019-02-26 09:01:09 +01:00
vis2k
d42c13ad15
comment out unused function
2019-02-26 09:00:16 +01:00
vis2k
2c54ab3722
NetworkClient.connection via property
2019-02-26 08:59:43 +01:00
vis2k
605c4d471c
rename m_ClientId to clientId
2019-02-26 08:57:12 +01:00
vis2k
4634f0632e
comment out unused GenerateConnectError
2019-02-26 08:55:04 +01:00
vis2k
f87f00effa
remove unused ctor
2019-02-26 08:54:20 +01:00
vis2k
c3b6fc5f4e
syntax
2019-02-26 08:53:44 +01:00
vis2k
bb3bf0635b
Networkclient active ( #448 )
...
* use NetworkClient.active directly
* add comment
2019-02-26 08:50:59 +01:00
vis2k
24b3b0d0fb
Networkclient singleton ( #447 )
...
* NetworkClient.allClients replaced with singleton because there is only ever one client.
* use this()
* remove redundant log
2019-02-25 22:01:42 +01:00
vis2k
6c229c8c58
LocalClient: add internalmsgs comment
2019-02-25 20:27:12 +01:00
vis2k
39ec1fd256
0gc recv ( #445 )
...
* Protocol.UnpackMessage returns reader instead of content to avoid manually extracting content, just to create a reader from it in all callers
* Create NetworkReader outside of Protocol.Unpack
2019-02-25 20:15:47 +01:00
vis2k
647ff39d3f
remove trailing whitespaces
2019-02-25 16:59:21 +01:00
vis2k
745519982e
Merge pull request #443 from vis2k/0gc
...
0gc
2019-02-25 13:57:31 +01:00
MrGadget
3735b3bd72
Update NetworkLobbyManager.cs ( #442 )
...
Removed two unused methods
2019-02-25 06:27:27 -06:00
vis2k
086de4bf88
NetworkServer.SendToReady/All/Observers: only pack message once instead of repacking it for each one again. This should avoid giant amounts of allocations (PackMessage->Writer.ToArray()) and computations
2019-02-24 22:52:42 +01:00
vis2k
10c5592f75
NetworkConnection.SendBytes made internal so it can be used by NetworkServer
2019-02-24 22:52:29 +01:00
vis2k
5e09d13d6e
NetworkIdentity: cache UNetUpdate UpdateVarsMessage
2019-02-24 22:27:02 +01:00
vis2k
7392de2790
Protocol.PackMessage caches writer and takes message as parameter to serialize it directly into the writer after writing the message type.
2019-02-24 22:20:45 +01:00
vis2k
6c3401c4fe
OnSerializeAllSafely: cache writer
2019-02-24 22:11:33 +01:00
Paul Pacheco
7323d450ad
Add MIRROR define and version ( #437 )
...
* Add MIRROR define and version
* Update PreprocessorDefine.cs
2019-02-24 20:35:14 +01:00
Paul Pacheco
34392915c8
NetworkMessage can be value type. It eliminates per message allocation ( #417 )
2019-02-24 20:32:19 +01:00
MrGadget
4a59f563e0
Network Lobby Updates ( #438 )
...
* Fixed 1 link to be relative
Removed Wiki link from ReadMe
* Made ClientLoadedScene virtual
Updates to scene object references
Scene and vsync handling improvements
Minor cleanup.
* removed all use of vSyncCount
* Fixed bug with ReadyToBegin being incorrectly set
2019-02-24 20:31:13 +01:00
Paul Pacheco
567fa8acf5
Use C# 7 pattern matching
2019-02-23 08:28:36 -06:00
Paul Pacheco
80a4b9d139
Simplify with auto properties
2019-02-23 08:27:26 -06:00
Paul Pacheco
8fc66d3b26
Simplify with auto properties
2019-02-22 19:36:35 -06:00
Paul Pacheco
6ab0a0a7c2
use C#7 out variable declaration
2019-02-22 19:17:15 -06:00
Paul Pacheco
b45d52c765
use C#7 out variable declaration
2019-02-22 19:08:50 -06:00
Paul Pacheco
1191db75d0
We no longer support unity < 2018.3
2019-02-22 19:05:36 -06:00
Paul Pacheco
3ed430a6d1
use C#7 out variable declaration
2019-02-22 19:03:16 -06:00
Paul Pacheco
992bc8ac4e
use C#7 out variable declaration
2019-02-22 19:02:10 -06:00
Paul Pacheco
6018f4d9db
use C#7 out variable declaration
2019-02-22 19:01:24 -06:00
Paul Pacheco
505d2b85ad
use C#7 out variable declaration
2019-02-22 18:59:35 -06:00
Paul Pacheco
9f21421d33
Simplify with auto properties
2019-02-22 18:58:54 -06:00
Paul Pacheco
95fd789ef4
use C#7 out variable declaration
2019-02-22 18:57:49 -06:00
Paul Pacheco
3573294d33
use C#7 out variable declaration
2019-02-22 18:54:44 -06:00
Paul Pacheco
8cff5e3f7d
use C#7 out variable declaration
2019-02-22 18:54:00 -06:00
Paul Pacheco
28f3875110
remove redundant initialization
2019-02-22 18:51:09 -06:00
Paul Pacheco
6e1087a02f
remove redundant initialization
2019-02-22 18:50:45 -06:00
Paul Pacheco
76af9ecec9
remove redundant initialization
2019-02-22 18:50:22 -06:00
Paul Pacheco
4772c4445c
remove redundant initialization
2019-02-22 18:49:08 -06:00
Paul Pacheco
b673167a9e
Fix indentation
2019-02-22 18:48:46 -06:00
Paul Pacheco
efac99813c
Simplify object initialization
2019-02-22 18:47:45 -06:00
Paul Pacheco
d2eac37aa9
Simplify list initialization
2019-02-22 18:45:58 -06:00
Paul Pacheco
792a356cdb
We require 2018.3 now
2019-02-22 18:45:16 -06:00
Paul Pacheco
0309f0b6f9
Use C#7 pattern matching
2019-02-22 18:43:18 -06:00
Paul Pacheco
5cc23fcc35
Make field readonly
2019-02-22 18:42:41 -06:00
Paul Pacheco
788c26a3fa
Simplify object initialization
2019-02-22 18:41:28 -06:00
Paul Pacheco
d5112fd65c
Remove redundant initialization
2019-02-22 18:40:11 -06:00
Paul Pacheco
c7e22d583c
Remove redundant initialization
2019-02-22 18:39:36 -06:00
Paul Pacheco
3755b6bbf0
C# 7 syntax
2019-02-22 18:38:11 -06:00
vis2k
d3afa9f26f
Utils.IsHeadless so it can be reused by other classes if needed.
2019-02-22 20:43:25 +01:00
vis2k
2a9d7e2df3
Upgrade to Unity 2018.3.6 to fix #427 and to prepare for LTS version
2019-02-22 09:29:39 +01:00
Chris Langsenkamp
7e7683766f
Network Lobby Manager & Lobby Player ( #356 )
...
* Initial Commit with Unity's Network Lobby Components
* Lobby Components WIP
* Massive simplifications and structural changes to NetworkLobbyManager and NetworkLobbyPlayer
* Replaced more default messages with Command structure resulting in further simplification and less LOC
* Completed removal of messages
* Code Formatting and GUI Layout
* Fixed bugs and finished Remove feature in UI
* Added Network Lobby Manager Doc
* Network Lobby Docs
* Network Lobby Player Doc
* Updated doc and image about Offline Scene
* changed to PNG
* Added Lobby components to navigation
* Conformed to naming convention
Removed some leftover cruft
Removed maxPlayers (redundant to maxConnections)
Trapped and killed null ref in OnServerDisconnect
* Fixed mistake in OnServerDisconnect
* Fix Active Scene check
* Alow clean switch to Offline scene
* Add Help URL attributes to components
* Added Help URL Attributes
* Fixed OnGUI logic error.
* Added Example and README
* Fixed Disconnect handler
* Updated Docs
* Added Header for Inspector
* Finished Lobby Example Minigame
* Minor cleanup
* Set targetFramerates
* Code Cleanup
Changed to extended Lobby Manager for player Indexes & colors
* Minor changes to align with Mirror's NetworkManager
* Fixed logic error
* SyncVar Hook Workaround
Random Start Positions
* Revert making CallOnClientEnterLobby public
* Added documentation to the extension
* Minor code rearrangement
* Made OnGUI virtual so it can be overridden.
Added AllPlayersReady bool for convenience to extenders
Start Game enhancement to example.
* added comments
* Corrected namespaces and usings
* Reworked DontDestroyOnLoad
LobbyPlayer: Moved code from OnStartClient to Start
Added LobbyPlayerExt to Lobby Example
Code cleanup, added regions
Fixed Start Game button bug
* Final push of Lobby example to make sure it's complete.
* Improved Lobby Example
* Code cleanup
* Added ground texture
Set player camera angle
Adjusted lighting angle
* Updated ReadMe
Cleaned up privates
Fixed example to use SetParent
Changed to 5 max connections in example
* Prefab name fixes due to Mirror master's changes
Changed camera handling and GamePlayer Prefab
Two more SetParent fixes
Demoted two warnings to information
Added more comments to example scripts
* Revisions based on Vis2K review...more to come.
* Added f's where assigning literals to floats
* Removed manual calls to SyncVar Hooks because the bug is now fixed.
* Changed to GUILayout
* wrapped in namespace
* Changed to GUILayout
* All changes per peer review
* Renamed folder to Lobby.
* Fix due to change in Mirror 1691
* Renamed Scenes
Added LobbyScene property to OfflineGUI script.
2019-02-20 16:58:50 +01:00
vis2k
82d4cf08ff
Revert "ClientScene.OnSpawnPrefab and NetworkManager.OnServerAddPlayerInternal: spawn objects with prefab names to avoid unnecessary "(Clone)" suffix from Unity. otherwise we need a name sync component in all games that show the names, e.g. MMOs for all monsters. This way we only need name sync components for objects that actually do change names, e.g. players." because of issue #426
...
This reverts commit 6a33c2d8bf
.
2019-02-20 10:19:17 +01:00
Paul Pacheco
dfd0e02125
Fix #372 , call syncvar hook for spawn ( #410 )
...
* Fix #372 , call syncvar hook for spawn
* Rebuilt the weaver with the changes
2019-02-18 13:07:36 +01:00
vis2k
b7ef2b3521
Fix #421 race condition by calling Transport LateUpdate after all other LateUpdates. Transport needs to send and apply data onto latest game state at all times. ( #424 )
2019-02-18 11:56:38 +01:00
Paul Pacheco
143404aab5
Remove unused import
2019-02-17 20:12:42 -06:00
Paul Pacheco
95a629686d
Simplify attribute name
2019-02-17 20:04:16 -06:00
Paul Pacheco
91760d88e3
Simplify with auto properties
2019-02-17 20:02:10 -06:00
Paul Pacheco
2114765668
Simplify more with auto properties
2019-02-17 19:59:17 -06:00
Paul Pacheco
e54a23a286
Simplify with auto properties
2019-02-17 19:57:34 -06:00
Paul Pacheco
c0cc77d062
Simplify with auto properties
2019-02-17 19:55:51 -06:00
Paul Pacheco
fc203dd89e
Simplify by using property
2019-02-17 19:53:11 -06:00
Paul Pacheco
559c1f155a
Simplify by using auto properties
2019-02-17 19:52:07 -06:00
vis2k
ee1b1c0b2b
Telepath updated to latest version
2019-02-17 09:00:10 +01:00
vis2k
2ec7de32df
Fix LLAPI.ToString
2019-02-17 08:55:28 +01:00
Chris Langsenkamp
ea3b48ab87
Replaced vars with explicit types ( #411 )
2019-02-17 08:45:13 +01:00
vis2k
8c441e8fe9
Transport.ServerGetClientAddress ( #412 )
2019-02-17 08:44:19 +01:00
Paul Pacheco
82cf23d348
Improve some comments
2019-02-15 06:29:54 -06:00
vis2k
bfe6e6aa28
better comments
2019-02-15 13:12:38 +01:00
vis2k
6a33c2d8bf
ClientScene.OnSpawnPrefab and NetworkManager.OnServerAddPlayerInternal: spawn objects with prefab names to avoid unnecessary "(Clone)" suffix from Unity. otherwise we need a name sync component in all games that show the names, e.g. MMOs for all monsters. This way we only need name sync components for objects that actually do change names, e.g. players.
2019-02-15 13:02:18 +01:00
vis2k
871fe9a7f4
syntax
2019-02-15 12:43:49 +01:00
vis2k
bc52ff5e62
TelepathyTransport: remove old comments
2019-02-15 12:41:12 +01:00
vis2k
ab30ac6141
Fix #223 : NetworkServer.DestroyPlayerForConnection tries to destroy both player controller and player owned objects if not null. No need to return early.
2019-02-14 13:38:34 +01:00
vis2k
5899cf81b5
refactor the fix for #389
2019-02-14 13:32:07 +01:00
uwee
0187163f70
fix for inactive scene in editor ( #389 )
...
* fix for inactive scene in editor
* changed to use #if UNITY_EDITOR
2019-02-14 13:26:53 +01:00
vis2k
9b232b0551
Revert "Source based weaver ( #319 )"
...
This reverts commit 8d7613b9b6
.
2019-02-13 15:59:32 +01:00
vis2k
d159e9c78b
Configurable Server Tickrate ( #390 )
...
* Configurable Server Tickrate
* only Update
2019-02-11 10:49:44 +01:00
Paul Pacheco
8d7613b9b6
Source based weaver ( #319 )
...
* Example for weaver issue
* Fix #314 , weave assemblies built before the weaver
* Don't need the example anymore
* Update CompilationFinishedHook.cs
* Dont try to load assemblies while they are being modified
* Revert "Weave dll again. Plan B for #314 (#323 )"
This reverts commit b20cb4280c
.
2019-02-09 18:14:26 +01:00
Paul Pacheco
1249ec25ac
Fix #371 , NetworkAnimator can support more than 6 variables ( #387 )
2019-02-08 09:32:36 +01:00
Chris Langsenkamp
d1626f7842
Add a virtual method that fires on the client right before scene change so devs can implement client-side work / prep / cleanup / visuals / etc. based on what scene is about to be loaded. ( #383 )
...
Documentation updates included.
2019-02-07 13:37:54 +01:00
Chris Langsenkamp
f1bdd8620c
Update TelepathyTransport.cs ( #382 )
...
Added Help URL
2019-02-07 12:26:45 +01:00