vis2k
fd561db9c2
NetworkServer.AddLocalClient: reused OnConnected
2019-02-26 16:07:40 +01:00
vis2k
81ecf61eed
LocalClient: move connect above disconnect
2019-02-26 16:07:40 +01:00
vis2k
7ac3749274
NetworkServer.RemoveLocalClient: remove unnecessary parameter
2019-02-26 16:07:40 +01:00
vis2k
9c58cb5c80
syntax
2019-02-26 16:07:40 +01:00
vis2k
a724503f6e
LocalClient.Disconnect: modify syntax to be more similar to NetworkClient.Disconnect
2019-02-26 16:07:39 +01:00
vis2k
6fa3aacea2
LocalClient: removed unnecessary m_Connected variable
2019-02-26 16:07:39 +01:00
vis2k
3967a7c089
LocalClient.InternalConnectLocalServer: always generate connect message
2019-02-26 16:07:39 +01:00
vis2k
903ca76c65
Remove NetworkServer.InvokeBytes. LocalConnection uses TransportReceive instead.
2019-02-26 16:07:39 +01:00
vis2k
c2dcf69e15
improve comments
2019-02-26 16:07:39 +01:00
vis2k
1c999df5de
syntax
2019-02-26 16:07:39 +01:00
vis2k
312ef309ae
NetworkConnection.TransportReceive: reuse InvokeHandler
2019-02-26 16:07:39 +01:00
vis2k
b15ad7dbc0
syntax
2019-02-26 16:07:39 +01:00
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
Gabe Brown
a5515b099e
BUG: TelepathyTransport delivers messages even when this.enabled == false across scene loads ( #379 )
...
* BUG: Fix issue where setting this.enabled = false doesn't get honored when transitioning from Local Offline Host to Connected Server.
* Update TelepathyTransport.cs
2019-02-07 10:13:23 +01:00
Chris Langsenkamp
5e642af577
Update NetworkManager.cs ( #376 )
...
Make "Multiple NetworkManagers detected" a full time error not hidden by log filter.
2019-02-06 15:30:16 +01:00
vis2k
548876a9b6
Syntax
2019-02-05 10:07:02 +01:00
Paul Pacheco
fba7b3f826
Add multiplex transport ( #358 )
...
* Add multiplex transport
* Simplify Availability method
* Update MultiplexTransport.cs
2019-02-05 10:02:32 +01:00
vis2k
4c749df4fa
Telepathy updated to latest version
2019-02-02 14:37:32 +01:00
vis2k
ca4ef1d8b3
LLAPITransport: expose connectionconfig and globalconfig in inspector
2019-02-02 11:08:52 +01:00
vis2k
de4b08d066
LLAPITransport: fix localhost connections
2019-02-02 11:08:20 +01:00
vis2k
1cc125d6c6
LLAPITransport: fix max connections error
2019-02-02 11:05:16 +01:00
vis2k
a210e8ce65
LLAPITransport: fix hostId out of bounds error
2019-02-02 11:02:45 +01:00
vis2k
dbbdcd02c7
Onserialize improvements ( #302 )
...
* position magic instead of allocating writers
* premature optimizations here we come
* simplify. less magic.
* better logging
* fix ondeserialize bugs caused by readpacketuint32 instead of readint32
2019-02-01 13:23:21 +01:00
vis2k
e690360f41
Updated Telepathy to latest version: Net 4.x, ConcurrentQueue/Dictionary, Fixed growing thread count bug in #347
2019-02-01 13:00:54 +01:00
vis2k
e6f5511d24
TelepathyTransport.ToString: fix NRE in server-only mode while listener wasn't created yet
2019-02-01 12:02:58 +01:00
Chris Langsenkamp
22e88cd8d4
Superfluous Code ( #366 )
...
Immediately after the deleted lines is a call to `OnClientDisconnect(netMsg.conn);` which calls `StopClient();` which has the exact same code on line 344 as what I'm proposing be deleted here.
2019-02-01 09:48:49 +01:00
vis2k
cb6bb75ee1
Use LateUpdate in Transports. Fixes race condition where Mirror would complain about 'Observer not ready for ...' when stress testing uMMORPG after bots machine was shutdown.
2019-01-31 16:19:14 +01:00
Chris Langsenkamp
46befb6682
Add Help URL attributes to components ( #359 )
2019-01-31 12:16:31 +01:00
Paul Pacheco
ee5befdd6d
Body expressions
2019-01-30 19:11:05 -06:00
Paul Pacheco
52887c2292
Body expressions
2019-01-30 19:10:53 -06:00
Paul Pacheco
c98f0c050c
Body expressions
2019-01-30 19:10:21 -06:00
Paul Pacheco
c2fbda6755
Body expressions
2019-01-30 19:10:12 -06:00
Paul Pacheco
869ae95138
Body expressions
2019-01-30 19:09:57 -06:00
Paul Pacheco
027dd3f91e
Use body expressions
2019-01-30 19:03:57 -06:00
Paul Pacheco
00c0d5a800
Use body expressions
2019-01-30 19:03:09 -06:00
Paul Pacheco
b816045c06
Null-conditional
2019-01-30 18:40:21 -06:00
Paul Pacheco
07e3d48dde
null-conditional operator
2019-01-30 18:37:21 -06:00
Paul Pacheco
17eedda836
null-conditional operator
2019-01-30 18:33:01 -06:00
Paul Pacheco
e15d3cdd71
Removed redundant conditional
2019-01-30 18:30:01 -06:00
Paul Pacheco
332416432e
.Net 4.x object initialization syntax
2019-01-30 18:25:26 -06:00
Paul Pacheco
d4cd4aef06
Use null-conditional operator
2019-01-30 18:21:12 -06:00
Paul Pacheco
beeef0cb96
Use null-conditional operator
2019-01-30 18:15:09 -06:00
Paul Pacheco
915dbd7af7
4.x syntax
2019-01-30 18:09:41 -06:00
Paul Pacheco
67767cb131
Fix namespace
2019-01-30 18:09:41 -06:00
uwee
0b5d325062
Removed hostPort as its no longer used. ( #360 )
2019-01-30 22:12:49 +01:00
Paul Pacheco
ed4c577680
This class should never be instantiated
2019-01-30 07:58:22 -06:00
Paul Pacheco
f6af36d74b
4.x syntax
2019-01-30 07:56:55 -06:00
Paul Pacheco
138dfaa6e1
4.x syntax
2019-01-30 07:55:34 -06:00
Paul Pacheco
7d081da541
4.x syntax
2019-01-30 07:53:04 -06:00
Paul Pacheco
306f974e0c
4.x syntax
2019-01-30 07:39:21 -06:00
Paul Pacheco
ca6224d238
4.x syntax
2019-01-30 07:37:53 -06:00
Paul Pacheco
63f6e40289
4.x syntax
2019-01-30 07:32:43 -06:00
Paul Pacheco
272ac79409
4.x syntax
2019-01-30 07:31:40 -06:00
Paul Pacheco
a0b5d15362
4.x object initialization syntax
2019-01-30 07:27:30 -06:00
Paul Pacheco
b67fe66a91
4.x syntax
2019-01-30 07:24:58 -06:00
Paul Pacheco
69f07547c7
4.x object initialization syntax
2019-01-30 07:22:19 -06:00
Paul Pacheco
4bc87f74fd
4.x syntax
2019-01-30 07:20:52 -06:00
Paul Pacheco
39385d15ee
Reduce server CPU usage by limiting framerate
2019-01-29 19:23:41 -06:00
Paul Pacheco
1b915fbffb
Now we can stop even while connecting.
...
In some transports (Ignorance), when the player clicks "Connect", the transport goes in Connecting state. If the player clicks Disconnect
the transport remains in Connecting state.
This gives the transport a chance to cancel the Connecting process. This fix has been tested for quite some time in 2018 branch
2019-01-29 19:07:18 -06:00
Paul Pacheco
6c163d1a45
Fix NRE when disconnecting
2019-01-29 19:01:03 -06:00
vis2k
2e0c38aec8
Upgrade to Unity 2018.2.20f1
2019-01-29 22:44:24 +01:00
vis2k
b20cb4280c
Weave dll again. Plan B for #314 ( #323 )
...
* weaver as dll again
* add plugins/weaver folder with latest weaver dll
* Remove unnecessary Debug-Editor/Release-Editor configurations
* Remove old comment
* Build into Assets/Mirror/Plugins directly
2019-01-28 18:20:18 +01:00
vis2k
1a5ce38163
Dispatch Messages as Events - via UnityEvent ( #350 )
...
* Transport as events - via UnityEvent
* call RemoveTransportHandlers();
* hide event in inspector until we actually need them
2019-01-27 20:58:22 +01:00
Callum Ferguson
f98d3405f5
Fixed bug allowing one more than max connections to join ( #349 )
2019-01-27 11:12:40 +01:00
Paul Pacheco
ac07ac8941
Renamed class for clarity ( #346 )
2019-01-26 09:24:22 -06:00
Paul Pacheco
3a6b37c779
Assign transport in inspector ( #344 )
...
* Assign transport in inspector
* Update NetworkManager.cs
* Update NetworkManager.cs
* Update NetworkManager.cs
* Update NetworkManager.cs
* Move transport under NetworkInfo
* Updated scene with new properties
2019-01-26 08:20:33 -06:00
vis2k
90e8fabde9
ITransport converted to Transport as MonoBehaviour
2019-01-26 10:32:16 +01:00
vis2k
41a385afd8
NetworkServer HandleConnection: check if connectionId already in use
2019-01-25 15:02:57 +01:00
vis2k
e31a3a3c4d
NetworkServer HandleConnection: >0 check added to fix #321
2019-01-25 15:00:26 +01:00
vis2k
fe02dcab4c
Syntax
2019-01-24 20:00:09 +01:00
Paul Pacheco
9c990b938f
Remove Network Manager Editor ( #310 )
...
* Remove Network Manager Editor
* Add reorderable list to prefabs
* Move Start On Headless to more logical place
2019-01-24 16:56:25 +01:00
vis2k
53fc33cce8
TelepathyTransport: added NoDelay option
2019-01-24 12:09:28 +01:00
vis2k
4f61dc9bc5
Updated Telepathy again. Forgot to check SendMessagesBlocking return value before.
2019-01-22 19:35:35 +01:00
vis2k
b3eb092878
NetworkTransformBase: remove unnecessary connectionToServer check
2019-01-22 16:34:12 +01:00
vis2k
98b786514c
Telepathy updated to latest version (performance improvements under heavy load)
2019-01-22 15:45:10 +01:00
vis2k
e969fcf26c
More #if fixes (again)
2019-01-21 14:38:53 +01:00
petris
15c5926041
Fix #if
2019-01-20 09:28:17 -06:00
vis2k
3396e56133
Telepathy updated to latest version (Stop always returns and .Active is definitely false afterwards)
2019-01-20 14:26:24 +01:00
vis2k
12f0ba6a64
NetworkTransformBase: fix interpolation being applied to a client's object that he had authority over. fixes #273
2019-01-18 17:50:43 +01:00
vis2k
1b90647f72
Pong: only simulate ball physics on server. Fixes #304
2019-01-18 17:34:59 +01:00
vis2k
32ed3cb540
Pong: Use OnStartServer instead of Server and ServerCallback
2019-01-18 17:32:03 +01:00
vis2k
c975d87310
Syntax
2019-01-18 17:30:30 +01:00
vis2k
4e6d44f3f7
Fix typo
2019-01-18 17:30:15 +01:00
vis2k
c0b2a74c11
Move NetworkReader.ReadMessage to the actual ReadMessage function
2019-01-18 13:09:58 +01:00
vis2k
ce8ede3db3
OnServerAddPlayer uses NetworkMessage parameter instead of NetworkReader. Removes last dependency on NetworkReader.ReadMessage ( #307 )
2019-01-18 13:08:19 +01:00
vis2k
183afac99a
move startOnHeadless to NetworkManager ( #309 )
2019-01-18 13:04:05 +01:00
vis2k
904535409d
Updated Telepathy to latest version (big endian headers)
2019-01-18 13:00:13 +01:00
vis2k
1c83c74da0
Transport components ( #308 )
...
* Convert Transport to component; remove websockets property
* Improve warning
* Automatically add default Transport if needed
* Added Transports to scenes
* Move port to Transport
* Detected too late
* Interface
* Virtual transport property just in case
* HUD shows transport.tostring
* LLAPITransport UseWebsockets option
* Remove bindToIp and ServerStart(ip) parameter. let transport handle it if needed.
* TelepathyTransport.ToString
* Remove unused function
* LLAPITransport.ToString
* Don't duplicate ports
remote endpoint already has the port.
If you have ipv6, it will show like this:
```[::]:7777```
[::] is localhost in IPv6
If you have ipv4, it will show like this:
```127.0.0.1:7777```
* Removed unused labels
* Syntax
* Updated Telepathy to latest version
* localendpoint
2019-01-17 18:14:05 +01:00
vis2k
4cf35eb9cd
Updated Telepathy to latest version
2019-01-17 18:02:44 +01:00
Paul Pacheco
d8bcbe0c62
Start on Headless is optional
2019-01-16 23:13:05 -06:00
vis2k
0ef7bc2c5a
Revert NetworkClient.UpdateClients foreach because it causes an InvalidOperationException when stopping the client.
2019-01-17 01:21:33 +01:00
vis2k
6738d95b28
NetworkConnection: removed unused imports
2019-01-16 22:24:25 +01:00
vis2k
123dbe8cd8
NetworkBehaviour: remove unnecessary 'private' modifiers
2019-01-16 22:23:22 +01:00
vis2k
8844616c33
LocalClient: remove unnecessary 'private' modifiers
2019-01-16 22:17:23 +01:00
vis2k
4ece68d053
OnObjectSpawnFinished message split into OnObjectSpawnStarted + OnObjectSpawnFinished. Saves 2 bytes of bandwidth per client spawn, and makes the code more obvious.
2019-01-16 22:10:08 +01:00
vis2k
7e9ed33448
Use actual type
2019-01-16 22:01:39 +01:00
vis2k
6cea00db0e
Use actual type
2019-01-16 22:00:04 +01:00
vis2k
663dedff81
Use foreach
2019-01-16 21:59:13 +01:00
vis2k
6104d5bafe
Use actual types
2019-01-16 21:55:24 +01:00
vis2k
c95fc2bf23
Use foreach instead of for-int
2019-01-16 21:52:53 +01:00
vis2k
edd8f99059
Remove unused imports
2019-01-16 21:49:11 +01:00
vis2k
28539c9d2f
NetworkClient: m_MessageHandlers made public and renamed to handlers. No need to have a separate property, it can't be nulled anyway.
2019-01-16 21:48:44 +01:00
vis2k
76bd13c789
Changed Boolean to bool
2019-01-16 21:45:15 +01:00
vis2k
03f0355359
DestroyObject moved next to Destroy
2019-01-16 21:38:03 +01:00
vis2k
b2ab752bc0
DestroyObject moved into Destroy. No need to have an internal version anymore because no one can override Destroy anymore.
2019-01-16 20:51:15 +01:00
vis2k
cdd4948eb8
UnSpawnObject moved into UnSpawn because that's the only function that calls it anyway
2019-01-16 20:49:03 +01:00
vis2k
9891916ba0
UnSpawnObject moved into UnSpawn because that's the only function that called it anyway
2019-01-16 20:46:43 +01:00
vis2k
c6cf8aad02
InternalAddPlayerForConnection: call GetCOmponent directly
2019-01-16 20:43:06 +01:00
vis2k
892d894d0f
InternalReplacePlayerForConnection: call GetComponent directly.
2019-01-16 20:42:31 +01:00
vis2k
7d439f0c20
SpawnObject: call GetComponent directly
2019-01-16 20:40:41 +01:00
vis2k
bd12048bd9
Update error message
2019-01-16 20:34:19 +01:00
vis2k
297c2974bd
NetworkServer.SendToClientOfPlayer uses NetworkIdentity now too
2019-01-16 20:32:30 +01:00
vis2k
5774f725c6
Make NetworkServer fully static. sealed not needed anymore then either.
2019-01-16 20:24:45 +01:00
vis2k
8fe142c1a7
SendToAll: change syntax for consistency with SendToRead/SendToObservers
2019-01-16 19:44:19 +01:00
vis2k
f7fbbee8d1
OnDeserializeSafely: check that correct amount of bytes was read
2019-01-16 19:25:43 +01:00
vis2k
6688bc39c8
SendToObservers uses NetworkIdentity parameter now too
2019-01-16 15:15:56 +01:00
vis2k
6c32dd561d
Syntax
2019-01-16 15:07:02 +01:00
vis2k
f95f127ed1
Syntax
2019-01-16 15:05:57 +01:00
vis2k
7e8c330475
SendToReady: removed context==null case where it would send to all ready connections. We never call it with null internally, and no one would assume to pass null there externally. Use SendToAll instead, or if needed we can add SendToAllReady in the future.
2019-01-16 14:49:23 +01:00
vis2k
32f77e41d4
NetworkServer.SendToReady uses NetworkIdentity to avoid two GetComponent calls per SendToReady: one for the old GetComponent<NetworkIdentity>, one for the callers which always used .gameObject before.
2019-01-16 14:47:38 +01:00
vis2k
dc9d12b67d
Rename 'uv' to 'identity'
2019-01-16 12:15:45 +01:00
vis2k
59dd73b0f1
NetworkIdentity: no need to wrap the dict as property
2019-01-16 12:12:29 +01:00
vis2k
80ac56a23f
Add comment
2019-01-16 12:09:30 +01:00
vis2k
63ac60a38c
UNetUpdate: check observers==null because the rest of the code does that too at the moment
2019-01-16 12:09:01 +01:00
vis2k
70f1fe8c5b
NetworkIdentity: move update methods next to each other
2019-01-16 12:08:37 +01:00
Paul Pacheco
f32ac7dfe6
Don't serialize the object if there are no observers ( #300 )
2019-01-16 12:07:59 +01:00
Paul Pacheco
4a8d780718
Do not pollute default namespace with examples
2019-01-15 17:44:17 -06:00
Paul Pacheco
9f06a5b55b
Minimum Mirror example
2019-01-15 17:35:53 -06:00
vis2k
76a1407c42
MonoBehaviourProcessor: better variable naming
2019-01-16 00:16:02 +01:00
vis2k
7c1eaf7363
Use actual type
2019-01-16 00:15:36 +01:00
vis2k
0710ce8b8d
Syntax
2019-01-16 00:14:25 +01:00
vis2k
0e344d7b3b
Syntax
2019-01-16 00:13:31 +01:00
vis2k
1ad865e367
Syntax
2019-01-16 00:10:20 +01:00
vis2k
10ee102399
Fix comment typo
2019-01-16 00:09:43 +01:00
vis2k
4a1129d572
Syntax
2019-01-16 00:08:11 +01:00
vis2k
3fc094ae5d
Use actual type
2019-01-16 00:06:43 +01:00
vis2k
324f277724
fix comment typo
2019-01-16 00:06:05 +01:00
vis2k
5633c63029
Helpers: use actual types
2019-01-16 00:04:48 +01:00
vis2k
6271acaec0
Fix comment typos
2019-01-15 23:52:24 +01:00
vis2k
9df0f0526d
Better variable names
2019-01-15 23:51:38 +01:00
vis2k
40ea1cfec6
Fix typo
2019-01-15 23:50:55 +01:00
vis2k
7a73bf4d01
Use actual types
2019-01-15 23:49:45 +01:00
vis2k
f57b58a83e
Sort modifiers
2019-01-15 23:33:28 +01:00
vis2k
7161126e67
GetReadFunc: use actual types. less magic.
2019-01-15 23:32:20 +01:00
vis2k
2def424a8a
GetWriteFunc: use actual types so it's more obvious
2019-01-15 23:31:14 +01:00
vis2k
f816c8f8e0
Sort modifieds
2019-01-15 23:29:41 +01:00
vis2k
a5c0d3fafb
Add a comment
2019-01-15 22:09:48 +01:00
Robin Rolf
c4f8b4eb8c
Reduce garbage in IsDirty ( #290 )
...
* Reduce garbage & Improve performance in NetworkBehaviour.IsDirty
* Update NetworkBehaviour.cs
* Update NetworkBehaviour.cs
2019-01-15 22:07:58 +01:00
vis2k
745233ca99
NetworkAnimator uses parameters array instead of 6 param values
2019-01-15 22:04:31 +01:00
vis2k
3fe93cbe44
Deprecate FindLocalObject. no need to have it in clientscene and networkserver when there is NetworkIdentity.spawned already in one place. ( #295 )
2019-01-15 21:43:55 +01:00
Ed
c02c852be5
Issue #280 fix ( #281 )
2019-01-15 21:37:47 +01:00
vis2k
b4fa6f262c
NetworkServer.DestroyPlayerForConnection uses NetworkIdentity.spawned instead of FindLocalObject
2019-01-15 16:52:36 +01:00
vis2k
9c672647a2
NetworkConnection.Dispose uses NetworkIdentity.spawned instead of FindLocalObject. Improves performance by avoiding one .gameObject call and one .GetComponent call.
2019-01-15 16:45:48 +01:00
vis2k
b9dca9c5aa
NetworkConnection: use actual type instead of var so it's more obvious
2019-01-15 16:44:00 +01:00
vis2k
e1647d766d
NetworkReader.ReadTransform uses NetworkIdentity.spawned instead of FindLocalObject
2019-01-15 16:43:14 +01:00
vis2k
434b778aa9
Weaver: removed findLocalObjectReference because it's not needed anymore.
2019-01-15 16:41:03 +01:00
vis2k
c96f44f73f
Add a comment
2019-01-15 16:39:09 +01:00
vis2k
695d56af5f
replacedEvents and replacementEvents combined into one replaceEvents dictionary. simplifies code and faster lookups.
2019-01-15 16:29:17 +01:00
vis2k
f10ca145b6
replacedMethods and replacementMethods combined into one replaceMethods Dictionary. Simplifies code and significantly speeds up weave time. uMMORPG script reload time in editor before: 7.6s, after: 5.75s (25% improvement).
2019-01-15 16:25:27 +01:00
vis2k
10fb2634c9
Use actual type
2019-01-15 16:06:27 +01:00
vis2k
29d71e6d43
Weaver: removed replacementMethodNames hashset which was only used for caching. Will be able to use a Dictionary<string, method> later.
2019-01-15 16:04:45 +01:00
vis2k
b13ba85f76
Use actual type so it's more obvious
2019-01-15 15:58:42 +01:00
vis2k
d016dc84f8
SyncVarProcessor.ProcessSyncVar: renamed netFieldId to netIdField because that's what it is
2019-01-15 15:57:30 +01:00
vis2k
940808567e
Weaver: removed unused netIdFields list
2019-01-15 15:55:40 +01:00
vis2k
57b848cc34
SyncVarProcessor.syncVarNetIds converted to Dictionary for easier usage and to avoid the netIdFieldCounters
2019-01-15 15:54:45 +01:00
vis2k
70048fc380
Use actual types instead of var because it's not obvious
2019-01-15 15:44:20 +01:00
vis2k
83e32dfec7
Add comment
2019-01-15 15:41:20 +01:00
vis2k
a5e3ec35c1
ErrorMessage reuses ByteMessage
2019-01-15 15:39:19 +01:00
vis2k
b2fa2eebed
Add ByteMessage
2019-01-15 15:38:30 +01:00
vis2k
2cc91f4b05
Syntax
2019-01-15 15:37:16 +01:00
vis2k
b75d215b2f
Syntax
2019-01-15 15:37:03 +01:00
vis2k
80860c40b7
RemoteCallMessage that is reused by Command/Rpc/SyncEvent messages
2019-01-15 15:36:47 +01:00
vis2k
d94b1a2d89
AddPlayerMessage inherits from BytesMessage
2019-01-15 15:32:42 +01:00
vis2k
3fce3ae675
Syntax
2019-01-15 15:30:27 +01:00
vis2k
93c65dcb78
Telepathy updated to latest version (afbdb31)
2019-01-15 14:24:25 +01:00
vis2k
aedf976d4f
NetworkAnimator moved to components. Replace messages with Cmds/Rpcs ( #294 )
2019-01-15 13:11:36 +01:00
vis2k
853083a132
Forgot to remove TransformMessage
2019-01-15 13:10:29 +01:00
vis2k
ffced61058
NetworkTransform moved into Components folder so it can be weaved. Removed unnecessary messages.
2019-01-15 12:24:29 +01:00
vis2k
0343e829b4
Movement example: speed now based on frame rate
2019-01-15 12:20:50 +01:00
vis2k
8ff2ba74b3
Forgot to enable local player authority in movement example
2019-01-15 12:17:50 +01:00
vis2k
9ecbf40a95
Fix sceneId assignment showing warning for 0 scene objects.
2019-01-15 11:26:23 +01:00
vis2k
60c9cbd99a
Fix sceneId assignment if scene not in build settings
2019-01-15 11:20:37 +01:00
vis2k
5b187fe0df
Asset Store Examples added
2019-01-15 11:17:58 +01:00
Ed
39da48a740
Changed syncInterval value is not saved - fix ( #293 )
...
syncInterval resets back to 0.1f (Value that is set in the NetworkBehaviour class) if changed using the editor. The issue is present when changing both, scene objects as well as prefabs.
2019-01-15 10:07:33 +01:00
vis2k
43baeff444
[SyncVar] GameObjects are now 100% based on their underlying netId field. Fixes #149 ( #292 )
...
* fix
* Test file
* Syntax
* NetworkBehaviour.Set/GetSyncVarNetworkIdentity functions added
* add definitions to weaver
* Use them
* add NetworkIdentity cases everywhere else too
* ProcessInstructionSetter/GetterField replaces for OnDeserialize too, so that [SyncVar]GameObjects/NetworkIdentities work with custom On(De)Serialize as well
* Custom on(De)serialize test
* Weaver.ProcessSiteMethod doesn't ignore OnDeserialize anymore either
* [SyncVar] GameObject/NetworkIdentity hooks work again
* testscene
* public gameobject field test
* pass gameobject field to getsyncvargameobject etc.
* GetSyncVarGameObject/NetworkIdentity always returns the field if server, looks up netId otherwise; functions aren't static anymore.
* Use original OnSerialize generation again, so it simply calls writer.Write(go) on server, which sends the netId internally anyway.
* fixed hooks not using 'this.' because getter function isn't static anymore.
* add scene referencing test
* remove tests
2019-01-14 23:39:29 +01:00
Paul Pacheco
3c0ff33c94
Additive sceneloading sceneid fix ( #175 )
...
* Fix additive scene loading causing duplicate sceneIds by using an offset per scene.
* TEST: moved SpawnableObjects to NetworkIdentity. OnDisable adds it to the dict. SpawnObject removes it.
* Log if we don't find the spawn scene object
* Fix compilation issues
* Make PrepareToSpawnSceneObjects public
2019-01-14 22:00:13 +01:00
Paul Pacheco
1785039601
2018.3 master prefab changes etc. ( #283 )
...
* 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.
* 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.
* Bug fix for 2018.3+ where NetworkIdentity GUIDs are set to blank in prefab files and shown as blank in the editor.
* Another 2018.3 warning fix. The old way to check if something is a porefab is depricated so needs replacing with new code.
* Make sure it works in 2017.4
* Change not needed
* Revert "Change not needed"
This reverts commit 13747739df
.
* Mark LLAPI as obsolete
* Don't use obsolete api
* Suppress obsolete LLAPI warning for now
* Remove warning
* Make conditional a little clearer
2019-01-14 11:24:30 +01:00
Hertzole
012e1a1885
Fixed scene reload.
2019-01-13 19:19:47 -06:00
vis2k
266f262665
WeaverLists.replacedFields and replacementProperties merged into replacementSetterProperties dict for easier code and more obvious naming.
2019-01-13 21:21:11 +01:00
vis2k
4fa584e72a
Weaver.ProcessInstructionField renamed to ProcessInstructionSetterField
2019-01-13 21:19:19 +01:00
Paul Pacheco
524c183294
Source based instead of dll ( #277 )
...
* Ignore unity generated files and folders
* Import mirror as source
* Source based does not build dlls anymore
* nuget packages not used in source based
* Produce an archive with the release
* generate archive with Mirror folder to avoid accidents
* Deploy to github releases
* Document new installation procedures
2019-01-13 21:08:54 +01:00