Commit Graph

1436 Commits

Author SHA1 Message Date
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
c84ea361f1 2018.3 ProjectSettings detected too late 2019-02-25 20:42:58 +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
c80a971126 2018.3 UnityConnectSettings detected too late 2019-02-25 20:15:16 +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
f5044e0b44 Note about GC in hot path in coding conventions 2019-02-24 22:34:10 +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
MrGadget
cda1240444 Update Application.md (#439)
Added OnStartAuthority and OnStopAuthority entries.
2019-02-24 10:40:16 +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
e545a21bd3 Switched braces to silent as suggested by Petris 2019-02-23 07:32:17 -06:00
Paul Pacheco
cd88964424 Don't suggest to add curly braces
Let's get real. This is all over the place:
```cs
if (LogFilter.Debug) Debug.Log(...);
```

Braces don't add value
2019-02-23 07:09:32 -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