Chris Langsenkamp
6508f595b1
Merge branch 'XMLComments' of https://github.com/MrGadget1024/Mirror into XMLComments
2019-08-01 01:08:45 -04:00
Chris Langsenkamp
1298148873
NetworkProximityChecker
2019-08-01 00:27:55 -04:00
Zac North
7ed4a9a1e0
feat(websocket): Re-enable native SSL ( #965 )
...
* fix(websocket): Internal implementation fixes re-enabling SSL while retaining performance
* Catch normal exceptions if they occur
* Catch another WebSocket exception
* Make sure the stream still exists before we try to write to it
* fix(websocket): Only use the new sending technique if the stream is an SslStream
* fix(websocket): Use a better path generation strategy so a leading slash is not required
2019-07-31 23:01:43 +02:00
Balázs Faludi
2ca2c488ac
fix: SceneId was not set to 0 for prefab variants ( #976 ) ( #977 )
...
* fix: SceneId was not set to 0 for prefab variants (#976 )
* Update NetworkIdentity.cs
2019-07-31 10:28:34 +02:00
Paul Pacheco
246a551151
perf: AddPlayerMessage is now a value type
2019-07-30 18:01:55 -05:00
Paul Pacheco
b5b2f3e1eb
perf: rpc messages are now value types ( #997 )
2019-07-30 14:33:44 +02:00
Paul Pacheco
f9ff44399b
feat: support writing and reading array segments ( #918 )
...
* Unit tests for writing array segments
* Add tests back for ArraySegment<int>
* Work in progress trying to generate writer
* Avoid boxing
* Weaver can now generate readers and writers for ArraySegment<T>
* Added by accident
* Clarify the loop
* Explain method specializer
* Remove unused method
* Explain loop in reader
2019-07-30 10:21:43 +02:00
MrGadget
051a9e2a39
Update Assets/Mirror/Components/NetworkProximityChecker.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:28:26 -04:00
MrGadget
f808558f32
Update Assets/Mirror/Runtime/NetworkIdentity.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:27:48 -04:00
MrGadget
2549217a94
Update Assets/Mirror/Runtime/NetworkIdentity.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:27:38 -04:00
MrGadget
6790d9056d
Update Assets/Mirror/Components/NetworkProximityChecker.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:27:27 -04:00
MrGadget
4fde22c436
Update Assets/Mirror/Components/NetworkProximityChecker.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:27:17 -04:00
MrGadget
f8eacd8607
Update Assets/Mirror/Components/NetworkLobbyPlayer.cs
...
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-07-29 19:27:02 -04:00
MrGadget
0df129f4c4
Replace Basic Example Again ( #996 )
2019-07-29 18:21:57 -05:00
Paul Pacheco
2d3151a5da
Folder is gone
2019-07-29 17:54:38 -05:00
Paul Pacheco
40c7d97ed9
perf: SpawnSceneObjectMessage is now a value type
2019-07-29 17:53:05 -05:00
Paul Pacheco
a44efd1f92
perf: SpawnPrefabMessage is now a value type
2019-07-29 17:52:06 -05:00
Chris Langsenkamp
9ffc6f2e44
NetworkLobbyPlayer
2019-07-29 18:20:51 -04:00
Chris Langsenkamp
96f4e2cc28
NetworkLobbyManager
2019-07-29 18:15:20 -04:00
MrGadget
2ba6847276
Correct scene for Basic Example ( #994 )
2019-07-30 00:05:46 +02:00
Chris Langsenkamp
8128adfca8
ClientScene
2019-07-29 17:39:24 -04:00
Chris Langsenkamp
ecdbf9a6b9
NetworkServer
2019-07-29 17:15:35 -04:00
Chris Langsenkamp
ed90b7dc3d
NetworkTransformChild
2019-07-29 17:15:03 -04:00
Chris Langsenkamp
44863fdab3
NetworkServer
2019-07-29 17:12:46 -04:00
Chris Langsenkamp
9666f361cf
NetworkStartPosition
2019-07-29 16:26:19 -04:00
Chris Langsenkamp
55decc95f7
NetworkProximityChecker
2019-07-29 16:22:22 -04:00
Chris Langsenkamp
b790ec38e8
NetworkManagerHUD
2019-07-29 16:13:12 -04:00
Chris Langsenkamp
d2b007e481
NetworkManager
2019-07-29 13:04:42 -04:00
Chris Langsenkamp
f6a441438e
NetworkClient
2019-07-29 12:55:38 -04:00
Chris Langsenkamp
99682a43bc
NetworkBehaviour
2019-07-29 12:52:03 -04:00
Chris Langsenkamp
e76a41011d
NetworkConnection
2019-07-29 12:49:21 -04:00
Chris Langsenkamp
5d860786ae
NetworkManager
2019-07-29 12:12:01 -04:00
Chris Langsenkamp
872da7ed34
NetworkManager
2019-07-29 11:54:00 -04:00
Chris Langsenkamp
976dadc1a6
NetworkManager
2019-07-29 11:53:17 -04:00
Paul Pacheco
407b36acb7
perf: SceneMessage is now a value type ( #989 )
2019-07-29 15:52:46 +02:00
Paul Pacheco
f99e71ebdf
perf: update vars is now a value type ( #990 )
2019-07-29 15:52:35 +02:00
Paul Pacheco
a32c5a9456
perf: objdestroy message is now a value type ( #993 )
2019-07-29 15:52:19 +02:00
Paul Pacheco
a49d938fbe
perf: ObjHideMessage is now a value type ( #992 )
2019-07-29 15:52:08 +02:00
Paul Pacheco
d071438d01
perf: ClientAuthorityMessage is now a value type ( #991 )
2019-07-29 15:51:43 +02:00
Paul Pacheco
145edaa50b
perf: empty messages are value types now
2019-07-29 08:18:17 -05:00
Paul Pacheco
35b9919d91
Revert "New Basic Example ( #985 )"
...
This reverts commit 66f7693855
.
2019-07-29 08:07:06 -05:00
Paul Pacheco
81d915eb73
perf: use value types for empty messages ( #988 )
2019-07-29 15:04:56 +02:00
Paul Pacheco
12437ba9c2
fix: don't use obsolete method
2019-07-29 08:00:03 -05:00
Paul Pacheco
633fb19f8d
perf: messages should be value types ( #987 )
2019-07-29 14:50:18 +02:00
Paul Pacheco
7c7c910a5e
perf: avoid allocation with message structs ( #939 )
...
* avoid allocation with message structs
* Use ternary operator instead of if
* Explain witchcraft
2019-07-29 14:50:09 +02:00
Paul Pacheco
b4077c1112
feat: safer and consistent writers names ( #979 )
...
* WriteUInt16
* WriteUInt16 weaver
* WriteUInt32
* WriteUInt64
* WriteByte
* WriteSbyte
* WriteChar
* WriteBoolean
* WriteInt16
* WriteInt32
* WriteInt64
* WriteDouble
* WriteDecimal
* WriteString
* WriteBytes
* WriteVector2
* WriteVector3
* WriteVector4
* WriteVector2Int
* WriteVector3Int
* WriteColor
* WriteColor32
* WriteQuaternion
* WritePlane
* WriteRay
* WriteMatrix4x4
* WriteGuid
* WriteNetworkIdentity
* WriteTransform
* WriteGameObject
* Keep consistent line breaks
* add new define so asset maintainers can tell if the new methods are available
2019-07-29 14:44:08 +02:00
vis2k
abf06df25d
fix: Telepathy updated to latest version. connectionId counter is properly reset after stopping server.
2019-07-29 14:36:18 +02:00
Chris Langsenkamp
be70684cf6
NetworkManager
2019-07-29 06:23:18 -04:00
Chris Langsenkamp
1b8d436b0a
NetworkAnimator
2019-07-29 04:34:53 -04:00
Chris Langsenkamp
678eb5a715
NetworkConnection
2019-07-29 04:30:14 -04:00
Chris Langsenkamp
f4ab3e853c
NetworkIdentity
2019-07-29 04:24:22 -04:00
Chris Langsenkamp
01d144bc62
NetworkConnection
2019-07-29 03:56:42 -04:00
Chris Langsenkamp
42f27dbc95
NetworkAnimator
2019-07-29 03:28:54 -04:00
Chris Langsenkamp
b196ea7367
NetworkBehaviour
2019-07-29 03:26:09 -04:00
Chris Langsenkamp
091c79b429
NetworkBehaviour
2019-07-29 03:21:30 -04:00
Chris Langsenkamp
572aaf4eba
NetworkClient
2019-07-29 03:01:54 -04:00
Chris Langsenkamp
40c8e4ba59
NetworkBehaviour
2019-07-29 02:39:47 -04:00
Chris Langsenkamp
88bd33a478
NetworkAnimator
2019-07-29 02:17:34 -04:00
MrGadget
66f7693855
New Basic Example ( #985 )
2019-07-28 18:13:38 -05:00
Paul Pacheco
eb4c00f8e4
Use array initializer
2019-07-24 20:09:10 -05:00
Paul Pacheco
60dcd2acdc
Syntax
2019-07-24 18:37:39 -05:00
MrGadget
45b711804b
fix: Don't increment counter in Awake ( #971 )
...
Doing it in Awake and also before assigning to clients skips connection ID 1.
2019-07-21 00:13:01 +02:00
MrGadget
7fecfe3065
ForceReload is always true, and the only use of it requred it to be false, so it's no longer needed. ( #970 )
2019-07-20 09:22:56 +02:00
MrGadget
3fb0337f8c
Lobby example update ( #969 )
...
* Updated Lobby Example
* Renamed cube to visor
* Missing files from PR 957
* Code Cleanup
2019-07-19 23:40:25 -05:00
MrGadget
43d4c7ecd7
Additive example update ( #968 )
...
* Updated Additive Example
* Renamed cube to visor
* Code Cleanup
2019-07-19 23:39:50 -05:00
Paul Pacheco
64a046803a
fix: do not accumulate changes if there are no observers fixes #963 ( #964 )
...
* fix: do not accumulate changes if there are no observers #963
* Update NetworkIdentity.cs
2019-07-17 14:59:46 +02:00
vis2k
310556c430
TelepathyTransport.ServerGetClientAddress: catch IL2CPP bug to at least continue to run
2019-07-17 12:32:03 +02:00
vis2k
22931fcd84
fix: Telepathy forgot to set socket options for accepted clients on the server
2019-07-14 11:13:51 +02:00
MrGadget
b0b57a23cc
Lobby example update ( #960 )
...
* Updated Lobby Example
* Renamed cube to visor
* Missing files from PR 957
2019-07-12 09:04:30 +02:00
MrGadget
7f966c9afb
Updated Additive Example ( #956 )
...
* Updated Additive Example
* Renamed cube to visor
2019-07-11 14:54:38 +02:00
MrGadget
7490094904
Updated Lobby Example ( #957 )
...
* Updated Lobby Example
* Renamed cube to visor
2019-07-11 14:54:25 +02:00
Paul Pacheco
47ecdb58c3
Use NetworkWriterPool in Message packing ( #958 )
2019-07-11 07:23:16 -05:00
Paul Pacheco
454c6ade47
Don't swallow stack trace
2019-07-03 07:38:46 -05:00
Paul Pacheco
97432169ea
perf: Recycle argument writer to avoid allocations ( #945 )
...
* Recycle argument writer
* Get a pooled networkwriter for argumens
* Use pool, not static variable
* Use explicit type
* Remove blank space
* Recycle writer in the weaver where it is allocated
2019-07-02 18:39:18 +02:00
Paul Pacheco
d2381ce892
perf: remove allocations during syncvar sync ( #946 )
2019-07-01 23:12:02 +02:00
Florimondable
3ee87fe7de
Initialize Unity event objects in Transport. ( #940 )
2019-07-01 09:54:47 +02:00
vis2k
d6389e68be
fix: properly stop client and server in OnApplicationQuit so that clients still get a chance to send then 'quit' packet instead of just timing out. Also fixes a bug where OnStopServer/OnStopClient were not called when stopping the Editor. ( #936 )
2019-06-28 19:22:40 +02:00
MichalPetryka
7181cd9ca1
perf: use 0 for null strings ( #926 )
...
* Use 0 for null strings
* Fix test
* No need for special case for ""
* No need for special case for ""
* Update Assets/Mirror/Runtime/NetworkReader.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-06-27 08:01:57 -05:00
vis2k
6bc65d500a
Telepathy.dll dummy file to overwrite old Telepathy.dll for people that update via Asset Store
2019-06-25 18:39:09 +02:00
MichalPetryka
21ca49d1be
perf: Use 0 for null byte arrays ( #925 )
...
* Use 0 for null byte arrays
* Update Assets/Mirror/Runtime/NetworkWriter.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
* Update comments
* Update Assets/Mirror/Runtime/NetworkReader.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
* Update Assets/Mirror/Runtime/NetworkReader.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
2019-06-25 13:53:43 +02:00
vis2k
5f05e2fd02
Don't always log scene index hash message on start anymore. SceneIds work fine now.
2019-06-25 11:03:24 +02:00
vis2k
8a190bfd17
fix: TelepathyTransport.ToString UWP exception
2019-06-25 10:34:26 +02:00
vis2k
c4a18cd8a4
Telepathy source drop-in for easier debugging
2019-06-24 17:49:01 +02:00
vis2k
315508dec0
NetworkWriterPool meta file
2019-06-24 17:47:52 +02:00
Paul Pacheco
f5e93180a1
feat: network writer pool to avoid expensive allocations ( #928 )
2019-06-24 14:49:42 +02:00
Paul Pacheco
ced36906bc
perf: return the contents of the writer as an array segment ( #916 )
...
* Return the contents of the writer as an array segment
* Use a safer ToArraySegment method and add some comments
* refactor: for readability and debuggability
* Test that ToArraySegment works
* Updated with master
* Update NetworkWriter.cs
2019-06-23 21:19:48 +02:00
Paul Pacheco
7b3e82a1fc
perf: remove BinaryWriter, it allocates like crazy ( #929 )
...
* perf: remove BinaryWriter, it allocates like crazy
* useless comment
* Update NetworkWriter.cs
2019-06-23 20:43:39 +02:00
Paul Pacheco
b2ba5896fa
perf: remove syncvar boxing ( #927 )
2019-06-23 10:02:30 -05:00
MichalPetryka
9e911b9d5e
Add byte array test ( #922 )
2019-06-21 22:58:36 +02:00
vis2k
488446ae04
fix: Telepathy already supports IPv6, but can no also connect to IPv4-only servers again (e.g. Mirror Booster)
2019-06-21 12:15:52 +02:00
Paul Pacheco
87b6ddf0e9
Use local variable instead of static variable
2019-06-20 18:03:08 -05:00
MichalPetryka
981ba7c2b3
fix: ArraySegment<byte> work in Messages ( #919 )
...
Add ArraySegment<byte> tests and make them pass
2019-06-20 13:11:06 -05:00
Paul Pacheco
81fb419840
Syntax simplification
2019-06-20 08:33:39 -05:00
Paul Pacheco
493f9c20c6
Remove unnecesary using
2019-06-20 08:30:57 -05:00
Paul Pacheco
4ebebabf9c
Remove unnecesary using
2019-06-20 08:30:37 -05:00
Paul Pacheco
ee5a3e946e
remove unused field
2019-06-20 08:28:15 -05:00
Paul Pacheco
1a26c78059
Removed unused fields
2019-06-20 08:25:42 -05:00
Paul Pacheco
072a049bfa
Add unit tests for array writer
2019-06-20 07:36:04 -05:00
Paul Pacheco
31b104d194
Order modifiers
2019-06-19 08:17:13 -05:00
Paul Pacheco
c8e18a1086
Made field readonly
2019-06-19 08:16:47 -05:00
Paul Pacheco
a2fc1f810b
Removed unused parameter
2019-06-19 08:16:26 -05:00
Paul Pacheco
68bebf9d6b
string comparison is culture independent
2019-06-19 08:14:13 -05:00
Paul Pacheco
c2aa934046
Class should be static
2019-06-19 08:11:20 -05:00
Paul Pacheco
4608b6f9a2
Remove unused parameters
2019-06-19 08:08:07 -05:00
Paul Pacheco
2b108f3f12
Remove unused parameters
2019-06-19 08:05:18 -05:00
vis2k
11750a9e7a
perf: Avoid allocation when reading message payload ( #912 )
...
* so far
* syntax
* add test
* more tests
* more tests
* convert messages
* use arraysegment in serialization and handle null case too
2019-06-19 14:11:17 +02:00
Paul Pacheco
dd758cac05
fix: don't convert null arrays to empty array ( #913 )
...
* fix: don't convert null arrays to empty array
* Add comments with generated code
* Document array reader
* Improve comments a little bit
2019-06-19 12:03:06 +02:00
vis2k
5ae379d6bb
Make ReadBytesAndSize more readable
2019-06-18 19:17:32 +02:00
vis2k
ac5d52062c
Rename new Write/Read segment functions to avoid redundant names with Write/ReadSegment that only writes the segment without the size
2019-06-18 19:12:43 +02:00
vis2k
18f035d268
perf: Networkreader nonalloc ( #910 )
...
* so far
* write and read strings
* move max to writer
* better
* readchar
* ReadDecimal
* improve ReadDecimal
* remove unused
* BENCHMARK
* add char test
* Update Assets/Mirror/Runtime/NetworkReader.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
* remove unnecessary return
* simplify char
* reuse ReadByte
* arraysegment support
* fix test
* EndOfStreamException like before
* disable test
* remove test
* add benchmark
* reset scene changes
* read/write decimals without allocating
* remove unused test
* remove FloatConversion class. Use converters directly.
* less magic
* 2 longs instead of 4 ints
* sort
* fix comment
* update error
* update errors
* update error
* syntax
* syntax
* write checks size after getbytes
* syntax
* syntax
* ReadBytes array.copy directly
* adjust error message
* check passed buffer
* better
* better
* ReadString directly from buffer without using a separate stringBuffer
* fix typo
* fix comment
2019-06-18 17:00:27 +02:00
vis2k
535b4d40fa
fix: Telepathy updated to latest version (IPv6 fix again)
2019-06-17 17:02:28 +02:00
Paul Pacheco
ff1a2346b4
perf: Optimize interest management ( #899 )
...
* perf: Optimize interest management
* Update NetworkIdentity.cs
* Update NetworkIdentity.cs
* Use explicit type
* Cache this set
* Update NetworkIdentity.cs
2019-06-17 16:16:36 +02:00
vis2k
2761ff23f4
fix: Telepathy updated to latest version: Correctly support IPv4 and IPv6 sockets
2019-06-17 10:42:56 +02:00
Paul Pacheco
70a532b5db
perf: eliminate string concat during remote method calls ( #908 )
...
* perf: eliminate string concat during remote method calls
* perf: params causes an array allocation
* refactor: simpler method hash calculation
* Update NetworkBehaviour.cs
2019-06-17 10:00:51 +02:00
Paul Pacheco
1c18743788
perf: eliminate small allocation on remote calls ( #907 )
...
* perf: eliminate small allocation on remote calls
* Update NetworkBehaviour.cs
2019-06-17 09:57:56 +02:00
Paul Pacheco
8f6d4cb22e
perf: eliminate boxing with lists ( #901 )
2019-06-17 09:54:43 +02:00
vis2k
cc6e4f696d
fix: Updated Telepathy to latest version to fix IPAddress.Parse error for "localhost"
2019-06-16 11:08:28 +02:00
MichalPetryka
3eaaa773b3
feat: Implement IReadOnlyList<T> in SyncLists ( #903 )
2019-06-14 08:41:14 -05:00
Paul Pacheco
9d81d49add
refactor: determine element type inside GenerateArrayWriter and Reader ( #902 )
2019-06-14 07:56:27 -05:00
MichalPetryka
e5eecbff72
feat: support sending and receiving ArraySegment<byte> ( #898 )
...
Add ArraySegment<byte> support to the weaver
2019-06-13 09:03:54 -05:00
Paul Pacheco
954a3d594d
feat: user friendly weaver error ( #896 )
2019-06-09 09:02:23 +02:00
vis2k
f39cdede98
Telepathy updated to latest version (IPv6 support)
2019-06-06 20:44:18 +02:00
gyststarblayze
3ec3d02362
fix : #840 by allowing Mirror to respect the forceHidden flag ( #893 )
...
* fix : #840 by allowing Mirror to respect the forceHidden flag on NetworkProximityChecker
* Update NetworkProximityChecker.cs
2019-06-06 08:39:35 +02:00
vis2k
9ff7feda9a
NetworkTransform.DrawLineBetweenDataPoints actually uses the color parameter now
2019-06-04 10:56:38 +02:00
vis2k
36be83d6fd
NetworkTransform: use local position and rotation for VR support. Fixes #779
2019-06-04 10:56:38 +02:00
vis2k
cb3d3dba72
Fix: TelepathyTransport.GetMaxPacketSize uses the new configurable max size
2019-06-04 10:07:24 +02:00
Alexander Seeck
fc181cb4ab
ASMDEF for Examples ( #850 )
...
* updated readme
* added asmdefs
* removed wrong change
2019-05-29 16:41:14 +02:00
Tom KRIKORIAN
d65bdde956
Spawn objects in local space instead of world space for VR support ( #875 )
...
* Spawn objects in local space instead of world space
Allow games where world origin is different for each players (Augmented reality for example) to spawn objects at the right position in the scene.
* Update ClientScene.cs
* Update NetworkServer.cs
2019-05-29 16:25:15 +02:00
MichalPetryka
55b6167061
Rename types according to Microsofts naming ( #882 )
2019-05-25 08:33:43 -05:00
MichalPetryka
b0426f90d3
Set parent in initialize ( #884 )
2019-05-24 09:24:37 +02:00
MichalPetryka
42a8f2afab
Remove conditional accesses on unity objects ( #880 )
2019-05-24 09:11:38 +02:00
Zac North
3c60b08762
fix(websocket): Remove send queues (they never worked) and SSL (temporarily) ( #879 )
2019-05-20 10:11:07 +02:00
vis2k
46eddc01ec
fix: (again) Telepathy updated to latest version (Send SocketExceptions now disconnect the player too)
2019-05-15 10:23:52 +02:00
vis2k
98d3fb0c31
fix: Telepathy updated to latest version (Send SocketExceptions now disconnect the player too)
2019-05-14 13:40:23 +02:00
Tom KRIKORIAN
691583e844
fix(NetworkManager) : properly load scene on clients using new load parameters ( #867 )
...
* fix : properly load scene on clients using new load parameters
* revert change to ClientChangeScene to avoid conflict
* Simplified code for NetworkManager method ClientChangeScene
2019-05-07 17:49:28 +02:00
Coburn
6fd3fb4ca3
This fixes NetworkManager not switching to the correct server scene when onlineScene is not the same as offlineScene. 99.99% sure it'll fix issue #865 ( #866 )
2019-05-07 17:33:01 +02:00
Gabe Brown
6af979c967
Logging Improvements ( #864 )
2019-05-07 09:34:32 +02:00
MrGadget
e9f2f538ca
Add channelId to Send Method ( #862 )
...
This is to achieve parity with NetworkConnection:
```cs
public virtual bool Send<T>(T msg, int channelId = Channels.DefaultReliable) where T: IMessageBase
{
// pack message and send
byte[] message = MessagePacker.Pack(msg);
return SendBytes(message, channelId);
}
```
2019-05-06 18:46:24 +02:00
Paul Pacheco
d4595df2ca
clear resharper error ( #861 )
2019-05-05 15:45:46 +02:00
vis2k
23e440bd0b
fix #857 : Revert "fix(websocket): Use a buffer for most WS messages in WebGL client resulting in 0 alloc for most messages ( #848 )"
...
This reverts commit 8967a20244
.
2019-05-05 09:24:46 +02:00
Zac North
1dc45f5376
Fix missing semicolon in NetworkBehaviour.cs ( #856 )
2019-05-05 00:36:46 +02:00
uwee
d48a3757da
feat(scene): Add support for scene loading params ( #644 )
...
* add scene and physics mode to SceneMessage
* Change variable names. Added comments. Changed type from struct to byte
* updated test to match
* added overrides to support scene params
* simplified param useage
* fixed types with proper casting
* forgot to add in Server side of code
* Update Assets/Mirror/Runtime/NetworkManager.cs
Co-Authored-By: uweenukr <uweenukr@gmail.com>
* Update Assets/Mirror/Runtime/NetworkManager.cs
Co-Authored-By: uweenukr <uweenukr@gmail.com>
* serialize as byte
2019-05-04 17:45:26 +02:00
Zac North
8967a20244
fix(websocket): Use a buffer for most WS messages in WebGL client resulting in 0 alloc for most messages ( #848 )
...
* fix(websocket): Use a buffer for most WS messages resulting in 0 alloc for most messages
* Use a configurable maximum message size
* Use the maximum message size on the server too
* Use <= instead of < for buffer.Length
* Show lengths in Exception message
Co-Authored-By: Katori <znorth@gmail.com>
* Show lengths in close message
Co-Authored-By: Katori <znorth@gmail.com>
* Allow messages of messagesize
Co-Authored-By: Katori <znorth@gmail.com>
* Allow messages of maxMessageSize
Co-Authored-By: Katori <znorth@gmail.com>
* Show message lengths in close message
Co-Authored-By: Katori <znorth@gmail.com>
* Don't initialize buffer if already done
Co-Authored-By: Katori <znorth@gmail.com>
* Always allocate buffer size on client construction
* Use a non-static buffer to avoid allocation issues
2019-05-04 12:08:23 +02:00
MichalPetryka
e22f527eef
Fix ?? ( #854 )
...
* Fix ??
?? doesn't work on unitys objects
* Update NetworkBehaviour.cs
2019-05-04 11:30:45 +02:00
MrGadget
f618e17366
Avoid memory leak from cloned materials ( #853 )
2019-05-01 19:47:53 +02:00
MrGadget
a18ab9db8f
Update README.md
...
Revised information in case MainScene was inadvertently changed without proper setup.
2019-05-01 09:50:30 -04:00
vis2k
227cc62475
Telepathy updated to latest version (removed send header & payload allocations)
2019-04-29 14:18:31 +02:00
vis2k
30ee71a6f8
Telepathy updated to latest version (removed header allocations)
2019-04-29 12:58:47 +02:00
vis2k
77bee450b9
perf: Transports now give ArraySegment<byte> instead of byte[] (based on #569 and #846 )
...
perf: Transports now give ArraySegment<byte> instead of byte[] (based on #569 and #846 )
2019-04-28 21:08:19 +02:00
vis2k
6c4b34ba06
fix: ListServer Ping not found in WebGL
2019-04-28 20:49:20 +02:00
vis2k
e8a8e77016
Telepathy updated to latest version (Message converted to struct to minimize GC)
2019-04-28 13:36:28 +02:00
vis2k
1f07af0cae
fix: Revert "refactor: consolidate prefab and spawn handlers ( #817 )" to fix a bug where if editor=host, build=client, we receive scene object not found when walking out of and back into an observer's range
...
This reverts commit b4c9c6fdc8
.
2019-04-24 17:04:28 +02:00
vis2k
5480548ffa
add comment
2019-04-24 13:11:36 +02:00
vis2k
f56507f2fc
fix: Revert "NetworkIdentity.observers dictionary is always created, but always empty on clients. Gets rid of all null checks." to fix server-only bug not allowing movement on client, e.g. in uMMORPG
...
This reverts commit e8d9d852e3
.
2019-04-24 13:08:10 +02:00
Zac North
0484a50e6d
Use queue for Ping and Pong messages as well ( #841 )
2019-04-24 09:28:34 +02:00
Zac North
5aa7148c60
Use message queue instead of SemaphoreSlim - SemaphoreSlim was severely bottlenecking performance ( #839 )
2019-04-23 10:23:47 +02:00
Coburn
2695da4e2a
LLAPI Transport not available on WSA/UWP (v2) ( #838 )
...
* LLAPITransport will not be available for WSA/UWP applications with this patch. (LLAPI never was to begin with).
* v2 of the not allowing LLAPI Transport to be available on UWP/WSA games
2019-04-22 11:15:17 +02:00
Coburn
7058de2364
LLAPITransport will not be available for WSA/UWP applications with this patch. (LLAPI never was to begin with). ( #837 )
2019-04-22 09:34:36 +02:00
vis2k
92a9903b0d
Disable sceneid assignment message
2019-04-22 09:23:36 +02:00
Zac North
2d682b5fad
fix(websocket): #829 fix InvalidOperationException with wss:// ( #830 )
...
* fix(wss): Use a queue on the server to avoid "InvalidOperationException: Invalid nested call."
* Remove unnecessary "private"
Co-Authored-By: Katori <znorth@gmail.com>
* Remove unnecessary "private"
Co-Authored-By: Katori <znorth@gmail.com>
* Update Server.cs
* comment: explain what is going on here
* comments: better comment
* Move queue into WebSocketImplementation instead of Server-specific
* Remove unused variables in Server
* Use a SemaphoreSlim instead of queue system
2019-04-21 10:33:07 +02:00
vis2k
52625923b2
fix: Mono.CecilX namespace to work around Unity 2019 Cecil namespace collision ( #832 )
...
* fix: Mono.CecilX namespace to work around Unity 2019 Cecil namespace collision
* rename dlls
* change asmdef guid for conflict with hlapi
* rename assemblynames too
* fix: invalid scene id in 2019.1 by ignoring prefabs in NetworkScenePostProcess
* rename projects too
2019-04-20 21:01:10 +02:00
vis2k
203a823b19
fix: invalid scene id in 2019.1 by ignoring prefabs in NetworkScenePostProcess
2019-04-20 20:39:44 +02:00
vis2k
b20c0d91f7
syntax
2019-04-19 09:28:39 +02:00
MrGadget
bcd3424c0e
refactor: Simplify GetStartPosition ( #828 )
...
* Simplify GetStartPosition
- Early out if startPositions.Count = 0
- Reduces the normal returns to single LOC each
- Only resets startPositionIndex if it reaches int.MaxValue
- Uses modulo and increment-after against count to pick round robin index
- Eliminates unnecessary last return that could never be reached
* Per Paul's request
2019-04-18 15:20:08 -05:00
MrGadget
8ebda0fa21
fix: Respect Player Prefab Position & Rotation ( #825 )
...
Respect Player Prefab Position & Rotation
2019-04-18 07:13:38 -05:00
vis2k
e8d9d852e3
NetworkIdentity.observers dictionary is always created, but always empty on clients. Gets rid of all null checks.
2019-04-17 23:04:52 +02:00
vis2k
aa4a91bcce
remove whitespace
2019-04-17 22:42:56 +02:00
Paul Pacheco
b4c9c6fdc8
refactor: consolidate prefab and spawn handlers ( #817 )
2019-04-17 16:00:03 +02:00
vis2k
b5ff43ada3
feat: SyncList.FindIndex added ( #823 )
2019-04-17 06:18:23 -05:00
MichalPetryka
2327498b31
Remove vars ( #819 )
2019-04-16 12:38:48 +02:00
MichalPetryka
6eaea267d5
Remove useless out ( #820 )
2019-04-16 12:38:22 +02:00
MichalPetryka
3b5fa051c1
Inline out ( #818 )
2019-04-16 12:38:01 +02:00
vis2k
3452915a4e
NetworkConnection.TransportReceive: don't try to invoke if unpacking failed.
2019-04-15 15:08:55 +02:00
Paul Pacheco
1352334747
fix: non ready connections should not observe objects
2019-04-15 07:32:41 -05:00
Paul Pacheco
e69c0976a2
refactor: Simplify nested if
2019-04-15 06:30:41 -05:00
Paul Pacheco
97f8bf6b26
refactor: use null propagation operator
2019-04-14 11:04:23 -05:00
Paul Pacheco
af0f79be14
refactor: removed unreachable if
2019-04-14 10:17:29 -05:00
Paul Pacheco
7417b68671
fix: check event prefix
2019-04-14 10:06:36 -05:00
Paul Pacheco
2598389036
refactor: use null propagation operator
2019-04-14 07:58:53 -05:00
MichalPetryka
fea09a6b74
Improve SceneID generation via RNGCryptoServiceProvider ( #812 )
...
* Improve SceneID generation
* Update NetworkIdentity.cs
2019-04-14 14:17:25 +02:00
vis2k
b9247a78b6
out syntax
2019-04-14 12:43:05 +02:00
vis2k
f3f0ef299e
clear sceneid if it was a duplicate
2019-04-14 12:40:16 +02:00
vis2k
3ebd4981a4
only use generated sceneId if not duplicate
2019-04-14 12:39:48 +02:00
MrGadget
705194023c
Remove all "private" ( #807 )
2019-04-14 09:43:03 +02:00
MrGadget
08cc3236a1
Fix Additive Example Scene Lighting ( #808 )
2019-04-13 21:41:46 +02:00
c6burns
3a50ca6352
fix: added new read/write symbol params ( #806 )
...
fix: added new read/write symbol params
2019-04-12 16:00:46 -05:00
vis2k
27b7e250a0
perf: OnDeserializeSafely without GC ( #804 )
2019-04-12 08:38:23 -05:00
vis2k
19a9995501
remove whitespace
2019-04-12 15:31:05 +02:00
vis2k
a82367b2c6
remove caching to keep it simple for now
2019-04-12 11:57:47 +02:00
vis2k
80d72c804d
remove empty whitespace
2019-04-12 11:55:22 +02:00
vis2k
7e79dfad38
disable 'Weaving succeeded' message now that everything works
2019-04-12 11:55:09 +02:00
c6burns
3ba546e133
fix : #791 corrected assembly paths passed to weaver ( #803 )
...
* fixed incorrect assembly paths
* Update CompilationFinishedHook.cs
2019-04-12 11:52:35 +02:00
vis2k
2eb247a6d2
Cecil StackOverflow fix without breaking API ( https://github.com/vis2k/cecil/commits/TypeReference_Resolve_StackOverFlow_Fix )
2019-04-12 11:23:44 +02:00
vis2k
0f1522229e
remove empty whitespace
2019-04-11 22:09:25 +02:00
vis2k
eb4b2f40c5
Weaver.ImportCorLibType: avoid MixIn exception when calling ImportReference with a null type. Log the type that we failed to resolve instead.
2019-04-11 22:09:14 +02:00
vis2k
286983a8f8
Fix StackOverflowException for NetStandard in Mono.Cecil by using https://github.com/vis2k/cecil/tree/TypeReference_Resolve_StackOverFlow_Fix
2019-04-11 21:57:14 +02:00
vis2k
9f67b4761f
Rebuild Cecil 0.10.3 DLLs from scratch via net4_0_Release mode
2019-04-11 20:10:43 +02:00
c6burns
9d4b96975e
minimum changeset for cecil 0.10.3 ( #795 )
...
* added fixes for cecil 0.10.3
* added missing meta
* fix typo'd asmresolver
* accept paul's suggestion, on behalf of c6
Co-Authored-By: rodolphito <rodol@rivalrebels.com>
2019-04-11 19:59:37 +02:00
vis2k
ec5ceb1149
update CompilationFinishedHook comment about cecil bug
2019-04-11 18:52:41 +02:00
Chris Langsenkamp
d46334d2eb
Add meta files for dummies
2019-04-11 11:22:40 -05:00
MrGadget
534a5a5834
Dummy NetworkAnimatorEditor
2019-04-11 07:22:01 -05:00
MrGadget
1dfd2dad6e
Dummy SyncListInitializer.cs
2019-04-11 07:21:44 -05:00
MrGadget
75e4f159e5
fix: Dummy file for SyncListStructProcessor.cs ( #798 )
...
Dummy file for SyncListStructProcessor.cs to avoid breaking compilation
2019-04-11 06:55:35 -05:00
MrGadget
b7e94d9e5a
Fixed typo
2019-04-11 07:44:41 -04:00
vis2k
bdbbed8b9d
Remove OwnerMessage to fix a bug where isLocalPlayer isn't reliable when checking it in Start() because OwnerMessage was received after SpawnFinished message ( #793 )
2019-04-11 00:01:31 +02:00
Paul Pacheco
97e9ac2483
perf: Reduce enum bandwidth ( #794 )
...
enums are serialized according to their size.
if enum extend byte, they use 1 byte
if enum extend short, they use 2 bytes
if enum extend int, they are varinted
if enum extend long, they are varinted
So on average, most enums will take 1 byte. Previously they always required 4 bytes
2019-04-11 00:01:09 +02:00
Paul Pacheco
f00c8e5e62
refactor: simplify enum logic a bit
2019-04-10 16:21:21 -05:00
Paul Pacheco
7b57830e6c
fix : #791 stack overflow in the weaver ( #792 )
...
remove unnecessary manual dispose calls in weaver
2019-04-10 16:58:49 +02:00
vis2k
5c850aa9ca
fix: workaround for #791
2019-04-10 16:03:37 +02:00
MrGadget
531e202bbe
fix: Round Robin Spawning by Hierarchy Order ( #790 )
...
Fixes #724
2019-04-10 12:34:14 +02:00
rodolphito
f46f32df55
Hide this obsoleted thing ( #786 )
2019-04-09 23:38:16 +02:00
MrGadget
69cb0389b0
Fixed ListServer example ( #785 )
...
Added EditorBrowsable(EditorBrowsableState.Never)
2019-04-09 22:02:15 +02:00
MrGadget
fd292e21bc
Obsoleted IsHeadless
...
IsHeadless() was just added in Feb. 2019, so I wouldn't expect wide usage so quickly, but since there have been 3 asset store publishes since then, it should be obsoleted for a bit.
Also made it `isHeadless` camelCase now that it's a property, which made obsoleting it possible.
2019-04-09 10:41:59 -05:00
MrGadget
e33581fa90
Simplify IsHeadless ( #782 )
2019-04-09 14:56:21 +02:00
Paul Pacheco
4644bc4b77
fix: Don't set framerate in host mode
2019-04-09 05:50:02 -05:00
vis2k
a2cc14bd20
fix: update NetworkIdentityEditor FindProperty to renamed variables
2019-04-09 11:40:59 +02:00
rodolphito
9d064c8013
These methods arent used, they should be commented along with the other error generator parts. ( #764 )
...
* These methods arent used, they should be commented along with the other error generator parts.
* Delete the comment
2019-04-09 10:01:57 +02:00
rodolphito
959be9338a
These should have been obsoleted with Paul's Message<T> PR ( #754 )
...
* These should have been obsoleted with Paul's Message<T> PR
* Do what vis says
2019-04-09 10:01:05 +02:00
rodolphito
cc3b4aaa6d
Simplify NetworkIdentity ( #752 )
...
* Simplify NetworkIdentity
* style: variable in separate line
Most of the code keeps the variables and attributes in separate lines.
2019-04-09 10:00:39 +02:00
rodolphito
7762158585
This should be readonly ( #778 )
2019-04-09 09:59:57 +02:00
rodolphito
07e355a3a3
Renamed networkBehaviours to networkBehavioursCache to reduce confusion ( #780 )
2019-04-09 09:56:28 +02:00
rodolphito
68433660ca
Make Weaver variable naming consistent ( #781 )
...
* Rename netViewTmp
* Rename UBehaviourIsServer
* Better name for IsServer
2019-04-09 09:55:56 +02:00
Rodol Phito
98d6e667b0
Added string binary compat test
2019-04-08 17:04:12 -05:00
Rodol Phito
dc0e07a851
Added string truncation test.
2019-04-08 17:04:12 -05:00
rodolphito
ca96e2a03f
Fix issue 763 by only catching while message decoding, and not during handling. ( #767 )
2019-04-08 15:53:45 +02:00
Paul Pacheco
fff765c96b
perf: use bitshift operations instead of division in varint
2019-04-08 06:18:56 -05:00
rodolphito
f0a8b5dea8
feat(telepathy): Split MaxMessageSize to allow setting a different value for client and server ( #749 )
...
* Split MaxMessageSize to allow setting a different value for client and server
* Rename fields to follow naming conventions, use using System;.
2019-04-08 09:53:46 +02:00
rodolphito
e8cae28258
This method isnt actually used anywhere. ( #674 )
2019-04-08 09:52:29 +02:00
vis2k
09a965e5bc
NetworkServer.SpawnObserversForConnection: remove redundant code with local client check. Local client ignores the spawn messages anyway. ( #735 )
2019-04-08 09:50:59 +02:00
rodolphito
7775801625
Follow naming conventions in NetworkBehaviour m_NetIdentity ( #760 )
...
* Follow naming conventions in NetworkBehaviour m_NetIdentity
* Use underscore prefix as per vis' suggestion
* renamed to netIdentityCache
2019-04-08 09:42:47 +02:00
rodolphito
1d3b3fcca9
Remove old comment ( #771 )
2019-04-08 09:18:14 +02:00
rodolphito
59a041810f
Add float binary compatibility tests to NetworkWriter, add tolerance threshold to Ray normal test. ( #772 )
2019-04-08 09:15:29 +02:00
Rodol Phito
4f21275a51
Added one more test to ensure theres no initial garbage when setting length
2019-04-07 20:44:58 -05:00
Rodol Phito
09089f166d
Added another clearer SetLength test, just in case.
2019-04-07 20:44:58 -05:00
Rodol Phito
63a14afdec
Test that SetLength and Position work as expected
2019-04-07 20:44:58 -05:00
rodolphito
72e4e55778
fix: Added WriteBytesAndSize tests, and fixed the function to be pedantic. ( #773 )
2019-04-07 20:11:41 -05:00
rodolphito
99c8f5c356
fix(serialization): Added NetworkWriter tests, found and fixed a bug in Write(Ray). ( #769 )
2019-04-07 16:10:17 -05:00
Paul Pacheco
03c767db6a
fix: Mark weaver as failed if serializing invalid type
2019-04-07 15:45:09 -05:00
rodolphito
f310c61405
tests: Add Endianness testing to NetworkWriter. ( #768 )
2019-04-07 15:17:35 -05:00
rodolphito
269c05bbf6
Updated debug messages in NetworkClient ( #761 )
2019-04-07 21:50:07 +02:00
MrGadget
3846e2f904
Fixed Lobby ( #765 )
2019-04-07 21:48:17 +02:00
vis2k
95d74bae60
remove outdated comment
2019-04-07 19:03:49 +02:00
rodolphito
b7ae7f006c
Simplify network connection clientOwnedObjects ( #758 )
...
* Simplify network connection clientOwnedObjects
* Whoops, missed this null check in NetworkServer. Thanks vis
2019-04-07 18:57:38 +02:00
Paul Pacheco
146988a6bb
style: remove blank lines
2019-04-07 11:49:25 -05:00
Paul Pacheco
6525dba77f
Remove resolved TODO
2019-04-07 11:47:52 -05:00
Paul Pacheco
077be58584
refactor: move SetupWriteFuctions to Writers
2019-04-07 11:44:43 -05:00
rodolphito
765c87e80c
Promote the Warning to an Error, because thats how it was before. Move it above the disconnect, in case Disconnect throws. ( #756 )
2019-04-07 18:41:01 +02:00
rodolphito
ecccb88be5
Follow naming conventions in NetworkBehaviour ( #759 )
2019-04-07 18:39:54 +02:00
rodolphito
f07ad218e0
This should have been readonly from day 1 too ( #757 )
2019-04-07 18:37:41 +02:00
Paul Pacheco
e01b5e4c7d
refactor: Move SetupReaders in Readers class
2019-04-07 11:35:38 -05:00
Paul Pacheco
53b3f435a3
refactor: Move readerFunc to readers class
2019-04-07 11:24:13 -05:00
Paul Pacheco
bf6278a28b
refactor: Move writerFuncs inside Writers.cs
2019-04-07 11:18:32 -05:00
Paul Pacheco
b3ee67ee28
refactor: remove unnecesary function
2019-04-07 11:10:28 -05:00
Paul Pacheco
b3b2673e09
refactor: remove unnecesary caches
2019-04-07 11:05:57 -05:00
MrGadget
48b155f785
Update LocalClient.cs
...
Corrected version
2019-04-07 04:44:10 -04:00
rodolphito
d3e3cb6a54
This should have been readonly from day 1 ( #751 )
2019-04-07 01:20:55 +02:00
rodolphito
f99466fa88
Remove a bunch of internals, it can be private. ( #748 )
2019-04-07 00:28:07 +02:00
c6burns
53be9b6d99
fix(weaver): fix #706 find system dlls ( #729 )
...
* added asmresolver back in
* disambiguate Assembly symbol
* add cache for pipeline asms
* add back precomp refs from pipeline
2019-04-06 22:02:14 +02:00
Paul Pacheco
d3baeeeec3
refactor: simplify writer/reader function lookup
2019-04-06 13:10:01 -05:00
Paul Pacheco
209a59fe73
refactor: make method private
2019-04-06 13:06:02 -05:00
Paul Pacheco
420fef509f
refactor: Move reader and writer generation to separate classes ( #746 )
...
* refactor: Move writer generation to a separate class
* refactor: Move reader generation out of weaver.cs
* refactor: Rename struct code generation functions
2019-04-06 12:53:39 -05:00
Paul Pacheco
b024362c29
refactor: simplify syncobject initialization
2019-04-06 09:12:17 -05:00
Paul Pacheco
06bbf6c3ab
style: use explicit variable types
2019-04-06 08:59:35 -05:00
Paul Pacheco
4aa6b34d90
style: indent for readability
2019-04-06 08:55:34 -05:00
Paul Pacheco
cf9f12d012
refactor: follow naming conventions
2019-04-06 08:46:31 -05:00
Paul Pacheco
5dee4e0c92
refactor: Reduce ProcessMethods cognitive complexity
2019-04-06 08:37:56 -05:00
Paul Pacheco
5a8e42028c
refactor: follow naming convention
2019-04-06 08:22:56 -05:00
Paul Pacheco
683ada6bd1
refactor: remove unused parameter
2019-04-06 08:21:38 -05:00
Paul Pacheco
81c9644a07
style: use explicit type
2019-04-06 08:19:34 -05:00
Paul Pacheco
34f308430b
style: Make class static
2019-04-06 08:19:13 -05:00
Paul Pacheco
c77bd5c59d
style: Make class static
2019-04-06 08:18:35 -05:00
Paul Pacheco
b705b67b39
style: use explicit type
2019-04-06 08:18:04 -05:00
Paul Pacheco
7e50ceaa73
style: use explicit type
2019-04-06 08:17:19 -05:00
Paul Pacheco
0b64616aa7
style: use explicit type
2019-04-06 08:14:56 -05:00
Paul Pacheco
12aa61a00d
style: use explicit type
2019-04-06 08:14:21 -05:00
Paul Pacheco
02bf5a5cf6
style: use explicit type
2019-04-06 08:13:55 -05:00
Paul Pacheco
017b5203c0
refactor: Remove unused nop
2019-04-06 08:13:37 -05:00
Paul Pacheco
0fb0c3671b
style: use explicit type
2019-04-06 08:12:33 -05:00
Paul Pacheco
9e6523e3fb
inline variable declaration
2019-04-06 08:12:11 -05:00
Paul Pacheco
da4e9df534
style: use compound assignment
2019-04-06 08:11:33 -05:00
Paul Pacheco
744910598d
style: use explicit type
2019-04-06 08:11:01 -05:00
Paul Pacheco
a95c796407
style: use explicit type
2019-04-06 08:10:19 -05:00
Paul Pacheco
15bef0bf47
refactor: remove unused nop
2019-04-06 08:09:41 -05:00
Paul Pacheco
f3a0c5763e
refactor: Remove unused parameters
2019-04-06 08:08:18 -05:00
Paul Pacheco
b7b827cebe
refactor: Remove unused parameters
2019-04-06 08:02:50 -05:00
Paul Pacheco
d563ec7a5c
refactor: Remove unused parameter
2019-04-06 07:59:27 -05:00
Paul Pacheco
c466be0f85
style: naming conventions
2019-04-06 07:53:14 -05:00
Paul Pacheco
cadb0cc51c
style: naming conventions
2019-04-06 07:50:58 -05:00
Paul Pacheco
aa75387d60
refactor: made fields readonly
2019-04-06 07:45:02 -05:00
Paul Pacheco
a302c180d3
refactor: naming convention
2019-04-06 07:43:55 -05:00
Paul Pacheco
adb16921c8
style: naming convention
2019-04-06 07:41:57 -05:00
Paul Pacheco
76392a3a4e
refactor: keep consistent namespace
2019-04-06 07:33:47 -05:00
Paul Pacheco
3a7646bab7
refactor: simplify switch
2019-04-06 07:16:36 -05:00
Paul Pacheco
0e285a5645
style: use simplest function available
2019-04-06 07:05:31 -05:00
Paul Pacheco
87e962b52b
style: 2 lines if
2019-04-06 07:01:48 -05:00
Paul Pacheco
eb1654f26e
style: naming convention
2019-04-06 06:56:16 -05:00
Paul Pacheco
314dde7d40
style: naming convention
2019-04-06 06:53:57 -05:00
Paul Pacheco
e8679a0562
refactor: remove pointless if
2019-04-06 06:51:37 -05:00
vis2k
b202473bcf
syntax
2019-04-06 13:33:38 +02:00
vis2k
9d2682eb2a
NetworkServer.SetupLocalPlayerForConnection: removed unused variable
2019-04-06 13:33:18 +02:00
vis2k
512c7ff521
NetworkManager.OnServerConnectInternal: simplify code
2019-04-06 13:18:21 +02:00
vis2k
c5236f5504
ClientScene.DestroyAllClientObjects is now called from ClientScene.Shutdown so that the NetworkManager doesn't have to worry about it
2019-04-06 13:13:32 +02:00
vis2k
a9a2afd06e
Remove NetworkManager.address because it seems pointless ( #744 )
2019-04-06 13:03:25 +02:00
vis2k
dfd729850e
NetworkIdentity.ClearObservers: simplify code
2019-04-06 12:43:22 +02:00
vis2k
dac128f036
NetworkIdentity.SetLocalPlayer: use foreach
2019-04-06 12:42:30 +02:00
vis2k
1ad3b120b6
NetworkIdentity.OnUpdateVars: reuse NetworkBehaviours which already calls GetComponents if not initialized yet
2019-04-06 12:40:46 +02:00
vis2k
242cf9f1d2
NetworkIdentity.OnStartClient: fix log message
2019-04-06 12:36:44 +02:00
vis2k
9e8dc924de
NetworkClient.RegisterHandler: remove unnecessary ToString
2019-04-06 12:32:11 +02:00
vis2k
c6fffc6505
add empty line
2019-04-06 12:20:58 +02:00
vis2k
54a24d7bda
ClientScene.AddPlayer: use proper variable name
2019-04-06 12:09:52 +02:00
vis2k
ef14026be4
ClientScene.RemovePlayer: shorter code
2019-04-06 12:09:00 +02:00
vis2k
fb716df129
fix: NetworkClient.Shutdown calls ClientScene.Shutdown again to properly clean up client scene. ClientScene only cleans up itself without touching transport or NetworkIdentities (fixes the bug where the player object wouldn't be destroyed after calling StopClient)
2019-04-06 12:03:57 +02:00
MrGadget
c691c07d96
Added EditorBrowsable(EditorBrowsableState.Never) to Obsoletes ( #741 )
2019-04-06 10:43:14 +02:00
rodolphito
333bbb062a
A gift for vis. ( #742 )
2019-04-06 10:42:52 +02:00
rodolphito
9d0cf977f9
Use checked() syntax to throw on overflow ( #740 )
...
* Use checked() syntax to throw on overflow
* Expect exceptions in the tests. Tests pass now.
2019-04-05 19:49:49 -05:00
rodolphito
b995a98743
Fixed NetworkReader tests, everything passes now. Also sneaked in two more tests for 0-length byte arrays because the conventional test didnt apply to them, since they didnt throw when there wasnt any data for them. Also made NetworkReader throw when it can't satisfy a request to read bytes past EOS. ( #739 )
2019-04-05 18:37:13 -05:00
rodolphito
f64e127378
Add tests for buffer overrun, raising the bar on NetworkReader. ( #734 )
2019-04-06 00:20:04 +02:00
vis2k
bd9d7b9fd6
NetworkReader.ReadString throws exception again
2019-04-06 00:18:55 +02:00
vis2k
cc16df72cc
Transport.TransportReceive catches exceptions and disconnects the connection after invalid data was received. ( #737 )
2019-04-06 00:17:45 +02:00
vis2k
7d2c5e5b0e
remove empty whitespace
2019-04-05 23:48:18 +02:00
vis2k
64ed66edbe
NetworkServer.InternalSetClientNotReady moved into SetClientNotReady because it can't be overwritten anymore anyway
2019-04-05 22:00:58 +02:00
vis2k
7b550fdf4b
NetworkServer.SetAllClientsNotReady: simplify code
2019-04-05 22:00:15 +02:00
vis2k
a526c39228
NetworkServer.InternalReplacePlayerForConnection: rename 'playerGameObject' to 'player' for consistency with AddPlayerForConnection
2019-04-05 21:57:36 +02:00
vis2k
e27ebf65bb
NetworkServer.InternalReplacePlayerForConnection: rename 'playerNetworkIdentity' to 'identity' for consistency with AddPlayerForConnection
2019-04-05 21:56:54 +02:00
vis2k
a3e9fbb5bd
NetworkServer.DisconnectAllConnections: simplify code
2019-04-05 21:53:24 +02:00
vis2k
a574b181bb
remove empty line
2019-04-05 21:45:01 +02:00
vis2k
fa64fa077f
NetworkServer: move UpdateServerObjects into Update
2019-04-05 21:43:17 +02:00
vis2k
2048addde4
NetworkClient.RegisterSystemHandlers: add comments
2019-04-05 21:33:02 +02:00
vis2k
a7e0b2c728
Add LocalClient.cs generated meta file
2019-04-05 20:23:39 +02:00
MrGadget
355585f1fc
Fixed Typo
2019-04-05 14:21:50 -04:00
MrGadget
fdb81ca2b2
Add LocalClient.cs Dummy for Asset Store ( #733 )
...
This file should ship with 1.7 to the Asset Store, and can be removed when 1.8 is ready to publish to the store in a May 2019.
2019-04-05 20:14:02 +02:00
rodolphito
95baed5e83
Add tests for strange floats, doubles, and decimals ( #732 )
2019-04-05 20:13:19 +02:00
vis2k
de0b9b5789
NetworkClient.active reads from .connectState so we don't have redundant states.
2019-04-05 20:11:22 +02:00
rodolphito
04370e56c0
Add more test cases to string read/write. ( #731 )
2019-04-05 19:52:39 +02:00
rodolphito
015d0d508e
fix: Potential DOS attack on server by sending packed ulongs when packed uints are expected. ( #730 )
...
* fix: Potential DOS attack on server by sending packed ulongs when packed uints are expected.
* Update NetworkReader.cs
2019-04-05 19:52:00 +02:00
rodolphito
3cee3abc48
fix: Potential DOS attack by sending invalid UTF8 byte sequences ( #727 )
...
* fix: Potential DOS attack by sending invalid UTF8 byte sequences
* Added test case for invalid UTF8 bytes
2019-04-05 19:47:37 +02:00
rodolphito
0d2f64228c
Added Unicode Strings test ( #728 )
2019-04-05 18:12:28 +02:00
vis2k
fdd35bc840
List Server Example: read IP from bytes again after list server IPv6 bug was fixed
2019-04-05 11:26:31 +02:00
rodolphito
4ee787b0eb
What even is m_td? Rename it to something that can actually be read. ( #709 )
2019-04-05 09:59:45 +02:00
rodolphito
5f63256cd1
We can hide this better by using this attribute ( #725 )
2019-04-05 09:59:25 +02:00
vis2k
ee2ace8e42
fix : #652 OnPostProcessScene includes disabled NetworkIdentities in scene
2019-04-04 18:41:42 +02:00
MichalPetryka
8caf299f4a
Whitespace and encoding normalization ( #722 )
2019-04-04 18:20:13 +02:00
rodolphito
7948961e14
Simplified code in NetworkConnection. ( #717 )
2019-04-04 18:17:44 +02:00
vis2k
62e28bdc46
List Server Example: IP as string again for easier IPv6 support
2019-04-04 17:08:44 +02:00
vis2k
11f34ef90f
List Server Example: update comments
2019-04-04 17:08:44 +02:00
vis2k
b329bc4e8a
List Server Example: improve comment log message
2019-04-04 17:08:44 +02:00
vis2k
bfe27ffadf
List Server Example: read/write title as UTF8 encoded bytes with length prefix
2019-04-04 17:08:44 +02:00
vis2k
5226ed64de
List Server Example: warn gameserver if it tries to send a too big message which would be rejected by List Server
2019-04-04 17:08:44 +02:00
vis2k
401455197f
List Server Example: read player, capacity before title
2019-04-04 17:08:44 +02:00
vis2k
33c8d5685f
add comment
2019-04-04 17:08:44 +02:00
vis2k
02fd8d3e8c
List Server Example: parse IP from bytes because the list server sends it as bytes now.
2019-04-04 17:08:44 +02:00
rodolphito
699a261e91
fix: weaver Cmd/Rpc/Target prefix check is no longer trash ( #707 )
...
* fix: weaver Cmd prefix check should not allow methods with names shorter than 3 characters.
* fix: weaver Rpc prefix check should not allow methods with names shorter than 3 characters.
* fix: weaver Target prefix check should not allow methods with names shorter than 6 characters.
* Update Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs
Co-Authored-By: rodolphito <rodol@rivalrebels.com>
* Update Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs
Co-Authored-By: rodolphito <rodol@rivalrebels.com>
* Update Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs
Co-Authored-By: rodolphito <rodol@rivalrebels.com>
2019-04-04 05:45:21 -05:00
vis2k
5994f0f207
List Server Example: show status indicator for client to list server connection
2019-04-04 10:08:58 +02:00
rodolphito
22d237505c
Renamed m_MessageHandlers to messageHandlers ( #708 )
2019-04-04 09:50:02 +02:00
rodolphito
cdeed8b558
Remove prefixes in NetworkAnimator. ( #710 )
2019-04-04 09:48:52 +02:00
rodolphito
77e5de7352
Renamed m_VisUpdateTime lastUpdateTime ( #711 )
2019-04-04 09:48:28 +02:00
rodolphito
a5ead70961
Rename s_NextNetworkId to nextNetworkId ( #712 )
2019-04-04 09:47:51 +02:00
rodolphito
13679887f4
Renamed m_CmdHandlerDelegates to cmdHandlerDelegates ( #713 )
2019-04-04 09:47:37 +02:00
rodolphito
382e125146
Removed s_ prefixes in NetworkManager ( #714 )
2019-04-04 09:47:12 +02:00
rodolphito
46841cdd3f
Remove k_ prefixes in weaver ( #715 )
...
* Rename k_CmdPrefix to CmdPrefix
* Rename k_RpcPrefix to RpcPrefix
* Rename k_TargetRpcPrefix to TargetRpcPrefix
2019-04-04 09:46:49 +02:00
rodolphito
df132b6893
Inlined an internal method call. ( #716 )
2019-04-04 09:46:19 +02:00
vis2k
e9717d87ad
Syntax
2019-04-03 16:05:45 +02:00
vis2k
370f66b9b4
List Server Example: add connected/disconnected log messages
2019-04-03 16:05:16 +02:00
vis2k
c617ffd61c
List Server Example: improve log messages
2019-04-03 16:05:03 +02:00
Paul Pacheco
053949b7d2
fix(weaver): #696 detect .mystruct = new MyStruct() changes with syncvars ( #702 )
...
* clearing struct should set dirty bit
This reproduces issue #696
using .mystruct = default uses initobj instead of stfld, so the weaver misses it
* refactor: use index for so that we can insert instructions
* refactor: rename test
* fix : #696 use generated setter for .mystruct = new MyStruct()
* Update PropertySiteProcessor.cs
* Update PropertySiteProcessor.cs
2019-04-03 13:59:37 +02:00
vis2k
5b30a94923
Merge pull request #705 from vis2k/MrGadget1024-patch-2
...
fix: Lobby Remove button not showing for P1 when Server Only
2019-04-03 13:37:16 +02:00
Paul Pacheco
e7c98af6eb
Obsolete non generic InvokeHandler
2019-04-03 06:27:46 -05:00
MrGadget
377c47ce74
fix: Lobby Remove button not showing for P1 when Server Only
2019-04-03 00:16:23 -04:00
Paul Pacheco
040bcb45ad
feat: SyncList now supports any IList implementation ( #704 )
2019-04-02 21:39:19 -05:00
Paul Pacheco
2683572fb4
feat: SyncDictionary can now be used for any IDictionary ( #703 )
2019-04-02 21:26:24 -05:00
vis2k
0c1d5001ba
Merge pull request #701 from Katori/DontDeletePDB
...
fix(Weaver): Don't delete the PDB after Weaving
2019-04-02 23:51:13 +02:00
Zac North
c78120eca2
Don't delete the PDB, what were they thinking?
2019-04-02 14:28:56 -04:00
vis2k
8dc0c73d77
Merge pull request #695 from MrGadget1024/Additive-Scene-Example
...
Additive Scenes Example
2019-04-02 17:08:28 +02:00
vis2k
e1b4b181c4
NetworkIdentity.RebuildObservers: change "Observer is not ready for: ..." warning to debug log, because it would constantly be spammed if a connection disconnects and we keep the player in the game for a while before disconnecting. E.g. if NetworkManager.OnServerDestroy delays the disconnect to avoid a player from fleeing combat.
2019-04-02 12:24:36 +02:00
vis2k
9c8211e573
NetworkServer.OnDisconnected: remove "Player not destroyed when connection disconnected." warning. This warning would be shown if a NetworkManager's OnServerDisconnect function wouldn't remove the player immediately, which is completely normal in most online games where the server delays a disconnect if the player was recently in combat - which would then show this warning every single time. OnServerDisconnect removes the player controller anyway, so there is no need for this warning at all.
2019-04-02 12:11:26 +02:00
Paul Pacheco
c58cf884d4
test: Test that setting syncvar sets dirty bits
2019-04-02 03:45:29 -05:00
Paul Pacheco
2ca80e1a90
refactor: move property site processor into a separate class
2019-04-02 03:16:50 -05:00
Paul Pacheco
ac697a454b
style: C#7 syntax
2019-04-02 02:32:29 -05:00
Paul Pacheco
312c0fcf5d
style: C# 7 code style
2019-04-02 02:27:11 -05:00
Paul Pacheco
9d54bf7bb1
style: naming convention
2019-04-02 02:26:01 -05:00
Chris Langsenkamp
297b671766
Renamed script to AdditiveNetworkManager
2019-04-01 19:18:15 -04:00
Chris Langsenkamp
2c0fa42568
Made Lobby player controller more similar to Additive player controller, per request.
2019-04-01 13:55:34 -04:00
Chris Langsenkamp
dc8f9b462a
Code changes as requested
2019-04-01 13:54:15 -04:00
vis2k
ab44ac8f8b
fix : #692 by always adding connectionToClient when rebuilding observers
2019-04-01 17:19:47 +02:00
vis2k
8f3c8edd86
RebuildObservers: add comments
2019-04-01 17:09:11 +02:00
vis2k
512e904ec0
RebuildObservers: order hashset syntax more logically
2019-04-01 17:01:44 +02:00
Chris Langsenkamp
32d6c19e5f
Initial Publish
2019-03-31 22:07:37 -04:00
Paul Pacheco
ee9c737bda
feat: allow users to detect mirror version 3
2019-03-31 13:27:03 -05:00
Paul Pacheco
e75d4b29dd
style: remove redundant methods
2019-03-31 11:30:30 -05:00
vis2k
b876e256eb
Merge pull request #689 from paulpach/zigzag
...
perf: Implement zigzag algorithm so negatives pack efficiently
2019-03-31 14:25:35 +02:00
Paul Pacheco
5f1ef4ab1f
perf: Pack small 64 bit negatives efficiently
2019-03-31 07:16:57 -05:00
Paul Pacheco
480af1aa6c
perf: Pack small 32 bit negatives efficiently
2019-03-31 07:16:51 -05:00
rodolphito
f5d80175fe
Fixed a typo in NetworkServer ( #691 )
2019-03-30 16:01:12 -05:00
rodolphito
2db7576bbc
perf: Use WritePackedUInt32 in SyncList ( #688 )
2019-03-30 12:33:16 -05:00
Paul Pacheco
3ec7f6c1d0
style: remove redundant field initialization
2019-03-30 12:21:37 -05:00
Paul Pacheco
d12c4b80ca
style: constructor of abstract class should be protected
2019-03-30 12:20:02 -05:00
rodolphito
594e8c9d89
Syncdict style ( #687 )
...
* Renamed m_Objects to objects
* Renamed Changes to changes
2019-03-30 12:16:35 -05:00
rodolphito
f61b757b8a
Synclist style ( #686 )
...
* Rename m_Objects to objects
* Rename Changes to changes
* Empty braces
* use default shorthand
* Use expression body getter
2019-03-30 12:09:37 -05:00
Paul Pacheco
bd304ab90b
style: follow C# code style conventions
2019-03-30 12:06:39 -05:00
Paul Pacheco
695979e914
feat: Add SyncHashSet and SyncSortedSet ( #685 )
...
* feat: Add SyncHashSet and SyncSorted set
2019-03-30 11:51:06 -05:00