MrGadget
d963e29d95
Made RandomColor a Separate Component ( #1240 )
...
* Made RandomColor a separate component
* Adjusted Prefab
* Simplified OnValidate
* Reverted unrelated changes
2019-11-28 09:42:46 -06:00
Chris Langsenkamp
c89ba52e3d
Change to using Color32
2019-11-27 21:32:25 -05:00
Paul Pacheco
a282c32394
clearer comment
2019-11-27 18:18:59 -06:00
Paul Pacheco
9a2ff84440
space in comment
2019-11-27 18:17:32 -06:00
Paul Pacheco
888e46c685
fix: OnSetHostVisibility can now check if it has authority
2019-11-27 17:53:30 -06:00
vis2k
d2075002ca
improve comment
2019-11-25 19:15:04 +09:00
vis2k
91fc3c25db
remove trailing whitespace
2019-11-25 19:11:55 +09:00
vis2k
ba88ca6ab5
explain the special case in RebuildObservers
2019-11-25 19:11:47 +09:00
Chris Langsenkamp
fad50818bf
Added AddComponentMenu empties and namespace
2019-11-24 14:35:19 -05:00
Chris Langsenkamp
37e5b49f28
Removed extraneous comments
2019-11-24 09:46:41 -05:00
Chris Langsenkamp
210540b669
Fixed Obsolete comment
2019-11-24 08:38:47 -05:00
Paul Pacheco
3b9414f131
perf: spawn with client authority only takes 1 message ( #1206 )
...
* perf: spawn with client authority only takes 1 message now
* Fix javadocs and warning
* Rename parameters
* Make sure we spawn players with authority
2019-11-24 10:22:43 +09:00
Paul Pacheco
5b04836bb2
fix: spawnwithauthority works again in host mode
2019-11-24 10:16:15 +09:00
Paul Pacheco
92d0df7b39
feat: SyncToOwner now works with authority ( #1204 )
...
* WIP redoing authority
* Local client also handles authority
* Remove unused callback
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Rename pendingOwner
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: vis2k <info@noobtuts.com>
2019-11-23 15:07:00 +09:00
Paul Pacheco
24d8368b38
refactor: reuse connectionToClient for authority ( #1200 )
...
* refactor: reuse connectionToClient for authority
* Fix compilation issue
* Make PR easier to read
* Better error message
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
2019-11-23 15:00:53 +09:00
Paul Pacheco
876da8bbcd
refactor: Simplify spawning
2019-11-23 14:54:37 +09:00
MrGadget
1e96cb7a8a
Replaces SpawnWithClientAuthority with Spawn Overloads ( #1233 )
...
* Replaces SpawnWithClientAuthority with Spawn Overloads
* Cleaned up comments and log messages
2019-11-23 14:26:27 +09:00
vis2k
e847344bde
syntax
2019-11-23 11:59:04 +09:00
vis2k
f0cf4e7e14
Replace 'local client' naming with 'host' to be less confusing. This breaks NetworkProximityChecker.OnSetLocalVisibility because it needs to be renamed to OnSetHostVisibility
...
* rename parameter
* obsolete
* rename parameter
2019-11-23 11:34:47 +09:00
Paul Pacheco
1d4b1faac2
docs: fix link to spawn custom player
2019-11-23 11:03:27 +09:00
Paul Pacheco
0bc151bb27
Obsolete built in messages
2019-11-23 11:03:18 +09:00
Paul Pacheco
c669ff155d
perf: avoid allocation for error messages
2019-11-23 11:03:08 +09:00
vis2k
1c7c54305d
add missing meta file
2019-11-23 11:00:49 +09:00
Chris Langsenkamp
638b445744
Update Prefabs After LocalPlayerAuthority Removed
2019-11-23 10:59:52 +09:00
MrGadget
8cf6a0707e
feat: Script Templates ( #1217 )
...
* Add Script Templates
* Moved serialization section down
* Added comments to Awake & Start
* Capitalization
* meta files
* Added doc links and XML comments
2019-11-23 10:59:38 +09:00
Chris Langsenkamp
477028913a
Update Prefabs After LocalPlayerAuthority Removed
2019-11-23 10:59:21 +09:00
Chris Langsenkamp
1699335aaa
fixed comment
2019-11-23 10:59:12 +09:00
Paul Pacheco
d741baed78
feat: Pass all information to spawn handler ( #1215 )
2019-11-23 10:57:52 +09:00
ZacNorthBigBox
701f4f4183
fix: Pass the name of the invoking class and desired command when an object has no authority. ( #1216 )
2019-11-23 10:57:45 +09:00
Paul Pacheco
2c58902357
Code style
2019-11-23 10:57:40 +09:00
Paul Pacheco
2081a757ea
Remove unused connection id cache
...
Good find by MrGadget
2019-11-23 10:57:32 +09:00
Paul Pacheco
2d4d4109bb
Make list cache readonly
2019-11-23 10:57:25 +09:00
Paul Pacheco
c2096d0fb7
Available transport is determined at connection time ( #1213 )
...
* Available transport is determined at connection time
* Update MultiplexTransport.cs
2019-11-23 10:57:11 +09:00
Paul Pacheco
ce305d95fc
Removed unused code
2019-11-23 10:57:09 +09:00
Paul Pacheco
15e03d9bbf
Removed unused code
2019-11-23 10:57:06 +09:00
Paul Pacheco
7ba4bc3590
use C# formatter
2019-11-23 10:56:53 +09:00
Paul Pacheco
09f6892c55
feat: An authenticator that times out other authenticators ( #1211 )
...
* feat: An authenticator that times out other authenticators
* Clean up some spaces
* Add tooltip for timeout
Disable timeout with 0
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Remove space
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* use float for time
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
* Update Assets/Mirror/Authenticators/TimeoutAuthenticator.cs
2019-11-23 10:56:51 +09:00
Chris Langsenkamp
d821013deb
Added HelpURL to NetworkBehaviour
2019-11-23 10:56:22 +09:00
Chris Langsenkamp
e33f2e84cb
Updated summary comments
2019-11-23 10:56:04 +09:00
Paul Pacheco
bf9eb610dc
feat: NetworkConnection is optional for handlers ( #1202 )
...
* feat: NetworkConnection is optional for handlers
* make NetworkConnction optional in handlers
2019-11-23 10:52:24 +09:00
Paul Pacheco
12fd2ae6fc
Remove redundant namespace
2019-11-23 10:52:12 +09:00
Paul Pacheco
236dcb6734
remove redundant type parameter
2019-11-23 10:52:02 +09:00
Paul Pacheco
1531281516
Enforce proper type for connectionToClient
2019-11-23 10:51:50 +09:00
vis2k
db99dd7b3d
fix: when modifying a prefab, Unity calls OnValidate for all scene objects based on that prefab, which caused Mirror to reset the sceneId because we only checked if a prefab is currently edited, not if THIS prefab is currently edited
2019-11-03 14:33:59 +01:00
vis2k
188b74edd6
Fallback Transport ( #1198 )
...
* Fallback Transport
* doc
* doc
* help URL
* exception
* fixed help url
2019-11-03 00:04:59 +01:00
Paul Pacheco
f70a2ac702
refactor: Simplify spawn message ( #1195 )
...
* refactor: Simplify spawn message
* Update Assets/Mirror/Runtime/Messages.cs
* fix brainfart
* consolidate spawning logic
* simpler find
* remove unnecesary private keyword
* Remove redundant else
2019-10-31 10:07:37 +01:00
vis2k
6765da2387
Make Transport.Available() abstract ( #1194 )
...
* Make Transport.Available() abstract
* better
2019-10-30 13:02:07 -07:00
vis2k
7fe8888df5
perf: MultiplexTransport: avoid Linq allocations that would happen on every packet send because Send calls .ServerActive() each time
2019-10-30 20:18:02 +01:00
Paul Pacheco
40f50ac908
breaking: Remove localPlayerAuthority ( #1192 )
...
* breaking: Remove localPlayerAuthority (#1188 )
* breaking: Remove localPlayerAuthority
This flag does not do anything useful in anything but NetworkAnimator
so NetworkAnimator can keep it's own flag.
* Add tooltip with explanation
* Editor should no longer access localPlayerAuthority property
2019-10-30 18:13:25 +01:00
Paul Pacheco
7df3ce37d1
fix: Don't throw exception getting address
2019-10-30 09:30:58 -07:00
Paul Pacheco
6cbef06e00
Simplify editor a bit
2019-10-30 05:49:04 -07:00
vis2k
d9afbfe4c9
rename 'owner' to 'isLocalPlayer' to prepare to be less confusing ( #1185 )
2019-10-27 16:30:06 +01:00
vis2k
27daf3fb0b
remove old comment
2019-10-27 15:01:21 +01:00
Paul Pacheco
8931944005
Destroy objects owned by this connection when disconnecting ( #1179 )
...
* Destroy objects owned by this connection when disconnecting
* How did this get here?
* Simplify keeping track of owned objects
2019-10-27 14:55:12 +01:00
Paul Pacheco
4d9e5809ee
tests: unit test local connections ( #1184 )
2019-10-27 14:47:06 +01:00
Paul Pacheco
f94adbf09b
refactor: local connections maintain their own queue ( #1183 )
...
* refactor: local connections maintain their own queue
* pass message to the counterpart connection
* Update LocalConnections.cs
* Update LocalConnections.cs
2019-10-27 14:09:54 +01:00
MrGadget
2d13512642
Remove redundant force authority ( #1180 )
2019-10-26 10:38:29 +02:00
Paul Pacheco
8d886ecf69
Remove leftover xmldoc parameter
2019-10-25 23:38:33 -05:00
Paul Pacheco
2ae5f0ddfc
Make sure we use a connection to client for clientAuthorityOwner
2019-10-25 23:09:19 -05:00
Paul Pacheco
24a7968cc2
refactor: Split NC for clients and servers ( #1175 )
...
NetworkConnection has been broken down into:
NetworkConnection
NetworkConnectionToClient
NetworkConnectionToServer
This way each class does one thing only, instead of trying to accommodate client and server functionality in the same class.
I can't go any further than this without breaking a lot of code. Ideally we would move the connectionId down to NetworkConnectionToClient, but that will result in a lot of breaking changes.
2019-10-25 23:01:54 -05:00
MrGadget
51653ed811
Remove Authority Set ( #1178 )
2019-10-25 13:13:57 +02:00
Paul Pacheco
1ec8910575
perf: allocation free syncdict foreach, fix #1172 ( #1174 )
2019-10-23 08:40:55 -05:00
Paul Pacheco
13e4e6fe3a
refactor: make it clearer that connection id is 0 or possitive
2019-10-23 07:21:20 -05:00
Paul Pacheco
035e6307f9
perf: allocation free enumerator for syncsets, fixes #1171 ( #1173 )
2019-10-23 11:36:52 +02:00
Paul Pacheco
ade7e76f45
This method should never be used by users
2019-10-22 20:23:48 -05:00
Paul Pacheco
745ef89e8c
make it clearer that connection id can't be -1
...
It was already impossible for he connection id to be -1
So make it clear.
Also make sure the connection id cannot change
2019-10-22 19:48:51 -05:00
Paul Pacheco
c0a7c8a6db
Users should never be creating NetworkConnections directly
2019-10-22 19:44:54 -05:00
Paul Pacheco
9dea4856ac
obsolete: Players should not really use connectionId
2019-10-22 18:46:36 -05:00
MichalPetryka
4ffd5a2e06
perf: Custom IEnumerator for SyncLists to avoid allocations on foreach ( #904 )
...
* Custom IEnumerator for SyncLists to avoid allocations on foreach
* add comments and benchmark
* remove unnecessary 'private'
* syntax
2019-10-22 17:41:09 +02:00
Paul Pacheco
60b2dcb94b
refactor:use ToString() to display connections ( #1170 )
2019-10-22 08:34:19 -05:00
vis2k
0a22e61787
add comment
2019-10-22 15:10:25 +02:00
Paul Pacheco
94eda38803
feat: Remove Command shortcut for host mode ( #1168 )
2019-10-22 10:13:27 +02:00
Paul Pacheco
22b45f7a11
perf: Use RemoveAt to remove elements from lists
2019-10-21 02:20:51 -05:00
vis2k
12c5a8fdc3
Revert "feat: Add Timeout to NetworkAuthenticator ( #1091 )"
...
This reverts commit e8cc9ba27b
.
2019-10-20 20:12:14 +02:00
MrGadget
e8fac8aba5
fix: Suspend server transport while changing scenes ( #1169 )
...
* Suspend transport
* fixed typo
2019-10-20 11:54:43 -05:00
MrGadget
e8cc9ba27b
feat: Add Timeout to NetworkAuthenticator ( #1091 )
...
* Add timeout to NetworkAuthenticator
* Added back the using Vis removed
* updated doc
* Typo
2019-10-20 11:23:34 -05:00
MrGadget
1fc1ed2708
fix: Don't give host player authority by default ( #1158 )
...
* Don't give host player authority by default
* Same when removing authority
2019-10-20 18:01:00 +02:00
Paul Pacheco
eb51da0b72
simplify tests
2019-10-19 11:29:52 -05:00
Lymdun
8be06fc453
Fix comments ( #1167 )
2019-10-19 10:06:30 -05:00
Paul Pacheco
2db9520b54
Cleaned up some tests
2019-10-19 10:05:30 -05:00
MichalPetryka
0fde090bf2
SyncList custom Equality Comparer support ( #1146 )
2019-10-19 16:02:08 +02:00
Paul Pacheco
9cb309e5bc
feat: Users may provide custom serializers for any type ( #1153 )
...
* feat: Users may provide custom serializers for any type
* Relax rules for rpc parameters to support user provided serializers
* Improve error messages
* Fixed component types
* Adjusted tests
2019-10-19 16:00:27 +02:00
MrGadget
ae5c92b40c
Rename includeSelf to includeOwner ( #1163 )
...
* Rename includeSelf to includeOwner
* Renamed isSelf too
2019-10-19 09:47:17 +02:00
MrGadget
11b3cce123
Refresh Data For Preview Window ( #1161 )
2019-10-19 09:41:06 +02:00
MrGadget
0295522d5a
Prevent NRE ( #1162 )
2019-10-19 09:39:46 +02:00
MrGadget
039abfcc81
Remove unnecessary virtuals ( #1156 )
2019-10-18 08:09:27 -05:00
MrGadget
c3fcf9117c
Update NetworkClient.cs
...
updated comment
2019-10-18 00:27:34 -04:00
Paul Pacheco
d8ce80fe0e
fix: don't call hook in host if no change, fixes #1142 ( #1143 )
...
* fix: don't call hook in host if no change, fixes #1142
* Update Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* avoid hook calls for GO and NI in host
* Update Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs
* Remove check from SetSyncVarGameObject
2019-10-17 09:31:31 +02:00
Paul Pacheco
34c419ee07
Update NI and GO fields for ease of use ( #1154 )
2019-10-17 09:30:29 +02:00
MrGadget
61428382f4
Make playerData public to get rid of Unity's warning ( #1152 )
2019-10-16 21:16:46 +02:00
MichalPetryka
0f951858c5
feat: SyncSet custom Equality Comparer support ( #1147 )
2019-10-15 09:07:15 -05:00
MichalPetryka
84555bc9d0
Fix invalid exception usage ( #1148 )
2019-10-14 19:39:00 +02:00
MrGadget
fd43c67d68
fix: Prevent Compiler Paradox ( #1145 )
...
* Prevent Compiler Paradox
* Change platform to Editor Only
* added new line at EOF
2019-10-14 07:32:24 -05:00
Paul Pacheco
ae2f5cb7d8
Make field readonly
2019-10-14 07:23:40 -05:00
Paul Pacheco
85faddfdd0
Remove unused, obsolete private method
2019-10-14 07:20:47 -05:00
Paul Pacheco
ec5434b087
Method should be static
2019-10-13 16:20:56 -05:00
Paul Pacheco
95138427f3
perf: avoid boxing for getting message id ( #1144 )
...
* perf: avoid boxing for getting message id
* Update Assets/Mirror/Runtime/MessagePacker.cs
Co-Authored-By: MichalPetryka <35800402+MichalPetryka@users.noreply.github.com>
* Update Assets/Mirror/Runtime/NetworkConnection.cs
Co-Authored-By: MichalPetryka <35800402+MichalPetryka@users.noreply.github.com>
2019-10-13 15:57:39 -05:00
Chris Langsenkamp
d5e3e56c78
Fixed HelpURL
2019-10-09 01:41:54 -04:00
MrGadget
bcc6af8527
Simplify Jump and reset player prefabs ( #1140 )
2019-10-08 09:35:08 +02:00
Chris Langsenkamp
98b6328f76
Merge branch 'master' of https://github.com/vis2k/Mirror
2019-10-07 06:41:35 -04:00
Chris Langsenkamp
86b5f565d0
updated comments
2019-10-07 06:41:12 -04:00
vis2k
231a384881
Telepathy updated to latest version
2019-10-07 10:43:47 +02:00
Chris Langsenkamp
1f2ff6b2c9
Code formatting
2019-10-05 10:13:13 -04:00
Chris Langsenkamp
d177df8f35
Changed to OnStartServer
2019-10-04 04:42:48 -04:00
Chris Langsenkamp
24052428e0
Removed unused Players object from scene
2019-10-04 04:25:18 -04:00
Paul Pacheco
c85d0df533
fix: webgl build fix #1136 ( #1137 )
2019-10-03 01:05:28 -05:00
MrGadget
5dfc85931f
Obsoletes OnServerAddPlayer ( #1134 )
...
* Obsoletes OnServerAddPlayer(NetworkConnection conn, AddPlayerMessage extraMessage)
* Fixed NetworkManager
* Fixed Pong
* Fixed Room
* Wrapped call in warning suppressors
* Improved comments
2019-10-02 10:26:19 +02:00
MrGadget
e73185932a
Updated Basic Example ( #1135 )
...
* Updated Basic Example
* Added more comments
* addes more comments
2019-10-01 21:52:36 -05:00
Paul Pacheco
77ec19c0dd
docs: update links to new add player documentation
2019-10-01 11:56:43 -05:00
Paul Pacheco
c0417e3788
docs: explain what TargetRpcProcessor does
2019-10-01 06:58:13 -05:00
Paul Pacheco
af6be4fe41
docs: explain what RpcProcessor does
2019-10-01 06:58:13 -05:00
Paul Pacheco
b0a67041d8
docs: explain what CommandProcessor does
2019-10-01 06:58:13 -05:00
vis2k
ed572da6a0
fix: NetworkBehaviourInspector wouldn't show SyncMode if syncvars / syncobjects were only private
2019-10-01 11:47:12 +02:00
Paul Pacheco
c24a73f6c9
fix: syncvars in commands work again ( #1131 )
...
* fix: syncvars in commands work again
2019-09-30 22:13:34 -05:00
Paul Pacheco
fb15c56d39
refactor: we no longer replace methods
2019-09-30 21:23:44 -05:00
Paul Pacheco
5ecd646134
fix: TargetRpc now works accross assemblies ( #1130 )
...
similar to #1128 but for TargetRpc
2019-09-30 21:19:32 -05:00
Paul Pacheco
13dbcb9f35
fix: ClientRpc methods now work accross assemblies ( #1129 )
...
Similar to #1128 but for client rpc
2019-09-30 21:17:30 -05:00
Paul Pacheco
d8a98d8d99
fix: Cmds can be called from child classes in other assemblies
...
fix #1108
2019-09-30 20:51:34 -05:00
vis2k
3831cbddbe
fix: Telepathy fix a bug where calling Disconnect while connecting to a dead end would freeze Unity because .Join would wait forever. Interrupt fixes it.
2019-09-30 19:30:13 +02:00
Chris Langsenkamp
82ebf44ae6
updated xml comments
2019-09-29 20:19:20 -04:00
Chris Langsenkamp
5f034bf3da
Added XML comments
2019-09-29 20:14:32 -04:00
Chris Langsenkamp
8e3f3c75de
Fixed XML comments
2019-09-29 18:08:24 -04:00
Paul Pacheco
32c75fe14c
Describe cleaner way to add customizable character ( #1090 )
...
* Describe cleaner way to add custom characters
* Update doc/articles/Guides/CustomPlayer.md
* Update doc/articles/Guides/CustomPlayer.md
* make example code clearer
* Update doc/articles/Guides/CustomPlayer.md
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update doc/articles/Guides/CustomPlayer.md
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update doc/articles/Guides/CustomPlayer.md
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update doc/articles/Guides/CustomPlayer.md
* Update doc/articles/Guides/CustomPlayer.md
* Apply suggestions from code review
2019-09-29 14:28:18 +02:00
vis2k
4ef6077d65
breaking: allocation free sends ( #1103 )
...
* so far
* websocket alloc free send
* keep old Pack name
* syntax
* LLAPI allocation free sends
* use ServerSend(list) for all
* multiplex send(list) based on https://github.com/vis2k/Mirror/pull/1118/files
* new mirror define
2019-09-29 13:34:15 +02:00
Paul Pacheco
c9f317ddee
feat: Websockets now give client address, fix #1121 ( #1125 )
2019-09-28 18:27:46 -05:00
Paul Pacheco
2cd36c8b58
Fix async warnings
2019-09-28 18:03:21 -05:00
Paul Pacheco
6402ecdf90
Fix xml docs
2019-09-28 17:52:46 -05:00
Paul Pacheco
dbafb2c56a
Get rid of warning
2019-09-28 17:49:27 -05:00
Paul Pacheco
5649cc6977
feat: profiler info is available in production builds
2019-09-28 16:54:22 -05:00
Paul Pacheco
65d81d6fb4
Transports now give the channel when receiving message ( #1124 )
...
* Transports now give the channel when receiving message
* Profile inbound messages channel id
2019-09-28 14:01:45 -05:00
vis2k
680d14338b
xmldocs too
2019-09-28 19:29:17 +02:00
vis2k
bc7e116a6e
feat: Transport can send to multiple connections at once ( #1120 )
...
* so far
* consider local conn
* internal Send(list) to avoid obsolete later
* typo
* empty line
2019-09-28 19:08:58 +02:00
vis2k
3c9459b60c
NetworkConnection.ValidatePacketSize
2019-09-28 17:02:06 +02:00
vis2k
e6a20a5ef0
just Send
2019-09-28 16:13:07 +02:00
vis2k
55698162c9
merge it ( #1119 )
2019-09-28 09:02:19 -05:00
Paul Pacheco
2696ee20f4
Use local connection send method
2019-09-26 19:09:22 -05:00
Paul Pacheco
15098d59ea
Add todo comment
2019-09-26 19:06:18 -05:00
Paul Pacheco
55c9bb625a
fix: pack works if message is boxed
2019-09-26 18:54:11 -05:00
MrGadget
9bce5a84e8
Remove Host Migration cruft ( #1114 )
...
* Remove Host Migration cruft
* Deprecated instead of removed.
2019-09-25 18:49:25 -05:00
MrGadget
85e607088a
Make RemoveClientAuthority easier to use ( #1113 )
...
* Make RemoveClientAuthority easier to use
* Added back the returns...oops
2019-09-25 13:45:18 -05:00
Paul Pacheco
db2e1488c1
fix #1096 move xmldocs to docs
2019-09-24 22:42:02 -05:00
MrGadget
7dfaf05cee
Unity 2018.4.9 changes ( #1111 )
2019-09-24 15:48:41 -05:00
Paul Pacheco
db8310f838
fix: Sync full netAnimator for new clients, fix #980 ( #1110 )
2019-09-24 09:35:24 -05:00
Paul Pacheco
d91b387bb2
fix(weaver): fix #796 , reload assemblies after initial import ( #1106 )
...
* fix: fix #796 , reload assemblies after initial import
* Do not weave assemblies that aren't compiled yet
* Update CompilationFinishedHook.cs
* Update CompilationFinishedHook.cs
* Use SessionState instead of env variable
2019-09-24 08:43:55 +02:00
Chris Langsenkamp
043cf29d0a
Fixed list items in comments
2019-09-23 03:26:41 -04:00
Chris Langsenkamp
97848e56fc
Updated links
2019-09-21 23:43:06 -04:00
vis2k
958fc256be
remove unused import
2019-09-21 22:44:55 +02:00
vis2k
633f7825ed
NetworkAuthenticator: OnStartServer/OnStartClient made virtual because not all authenticators need them.
2019-09-21 22:42:14 +02:00
vis2k
c3917cdf0b
NetworkAuthenticator: OnStartClient moved into client region
2019-09-21 22:41:07 +02:00
vis2k
a498bff511
syntax
2019-09-21 21:29:26 +02:00
vis2k
3a803c1c39
fix typo
2019-09-21 21:26:56 +02:00
MrGadget
99652b24f0
Reorder NetworkManager ( #1105 )
2019-09-21 11:50:55 -05:00
MrGadget
3e92f53a36
Update NetworkRoomPlayer.cs ( #1094 )
...
CmdChangeReadyState needs to be public
2019-09-21 09:25:01 -05:00
Paul Pacheco
a351879f91
perf: avoid boxing if there is no profiler
2019-09-21 08:19:07 -05:00
vis2k
4a13773dbc
remove old comment
2019-09-21 10:47:34 +02:00
Chris Langsenkamp
760b5284b9
Fixed obsoletes and comments
2019-09-20 20:31:41 -04:00
Paul Pacheco
5985e6d641
GetRpcMethod does not need an instance
2019-09-19 23:31:43 -05:00
Paul Pacheco
bc87649be6
Don't report out messages if there are no recipients
2019-09-19 23:27:34 -05:00
Paul Pacheco
e742ffad4b
Messages must be public for profiler
2019-09-19 23:26:50 -05:00
Paul Pacheco
838d4f019f
fix: Fix error scene error message in host mode
...
When using online scene and starting host mode, users were getting:
```
Closing connection: 0. Received message Mirror.SceneMessage that required authentication
```
2019-09-18 18:13:26 -05:00
MrGadget
e88316f336
Rename NetworkConnection.playerController to identity ( #1092 )
...
* change playerController to identity
* improved obsolete
* Obsolete comment
2019-09-18 10:32:26 +02:00
Chris Langsenkamp
9f09c21680
Revert "Remove add component from deprecated components ( #1087 )"
...
This reverts commit 8a99ab16e8
.
2019-09-17 23:23:13 -04:00
Chris Langsenkamp
6e4409b786
Fixed double-spaced bullets in docs
2019-09-17 20:34:26 -04:00
MrGadget
958e2ad612
Redefine SceneMessage ( #1093 )
...
* Redefine SceneMessage
* Add obsolete method
* Removed SceneLoader
2019-09-17 22:59:16 +02:00
Paul Pacheco
7ac43cd56a
feat: Secure messages that require authentication, fixes #720 ( #1089 )
...
* feat: Secure messages that require authentication, fixes #720
* Rename the parameter for clarity
* Update Assets/Mirror/Runtime/MessagePacker.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/MessagePacker.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
2019-09-17 22:16:37 +02:00
MrGadget
56bcb02c15
feat: Authentication Framework ( #1057 )
...
* Component-based Authentication
* Capitalized IsAuthenticated
* Added isAuthenticated to NetworkConnection
* Removed activeAuthenticator as unnecessary
* Removed unnecessary using
* Added more comments
* Documentation
* Added cs to code blocks in doc
* fixed typo in doc
* Doc improvements
* Fixed another typo in doc
* Removed HideInInspector
* Updated doc and image
* Fixed comment
* Added inspector header and tooltips
* Fixed typo
* Add AuthenticationData object
* Add a bullet point in the doc about AuthenticationData
* Updated screenshot image
* Added HelpURL attribute
* Added Initializers for both Server and Client
* Fixed doc grammar and phrasing
* Forgot to add the ClientInitialize in StartHost
* Updated doc with info about the initializers
* Changed initializers from bool to void.
* Eliminated the abstract model and renamed to NetworkAuthenticator and made all methods virtual
* Fixed comment
* Fixed typo
* Doc cleanup
* Doc Cleanup
* authenticator RemoveAllListeners in StopServer and StopClient
* Update Assets/Mirror/Runtime/NetworkManager.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Changes requested by Vis
* reverted conflicting change
* Revert "reverted conflicting change"
This reverts commit f65870e073
.
* UnityEditor.Undo.RecordObject
* made the name camelCase
* Added internal methods and On prefix to methods
* Reverted this change so it can be done in a separate PR
* Moved authenticator calls to after runInBackground
* Add built-in timeout feature
* Changed UnityEditor.Undo.RecordObject to use gameobject
* Convert to Abstract, add Basic Authenticator, update docs.
* Removed timeout, against my better judgement.
* Removed the rest of timeout, still against my better judgement
* Fixed event listener mappings
* Renamed and consolidated methods
* updated doc and image
* made OnClientAuthenticate and OnServerAuthenticate abstract
* Updated Debug log msgs
* changed to authenticator != null
* Renamed to NetworkAuthenticator
2019-09-17 10:41:04 +02:00
Paul Pacheco
e67035e971
Add profiler hooks ( #1086 )
...
* Add profiler hooks
* Polish API a bit
Now if we want to add more fields, we can do so without
breaking profilers
* Provide documentation for the profiler data
* Use -1 channel until we implement this feature
* Use C# events instead of UnityEvent
* Simplify message info structure
* Renamed class
* Send -> OnSend
Receive -> OnReceive
* Update Assets/Mirror/Runtime/NetworkConnection.cs
* Update Assets/Mirror/Runtime/NetworkDiagnostics.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update NetworkDiagnostics.cs
2019-09-17 08:45:51 +02:00
MrGadget
8a99ab16e8
Remove add component from deprecated components ( #1087 )
2019-09-16 22:14:02 -05:00
vis2k
229e5e8d6e
remove trailing whitespace
2019-09-15 19:04:33 +02:00
vis2k
524abfc5e8
fix: NetworkManager OnValidate wouldn't properly save the automatically added Transport before because Undo.RecordObject is needed for that now.
2019-09-15 19:04:33 +02:00
Paul Pacheco
5a9e14c79e
Expose methods for profiler ( #1083 )
2019-09-15 09:43:36 -05:00
vis2k
06c3385e7d
fix comment
2019-09-14 13:19:17 +02:00
vis2k
dcafadfdba
fix #1073 sync components with different intervals and add test ( #1077 )
2019-09-12 07:56:59 -05:00
vis2k
245dcfd1d9
forgot internal
2019-09-12 14:23:11 +02:00
MrGadget
d5e6bbc552
Clear Handlers on NetworkClient.Shutdown ( #1069 )
...
* Clear handlers on Shutdown
* Update NetworkClient.cs
* Update NetworkClient.cs
2019-09-12 13:35:08 +02:00
vis2k
414fa9cfb9
forgot to make internal for test
2019-09-12 11:52:24 +02:00
vis2k
811f3f63c3
Add test for ClearAllComponents and syncInterval
2019-09-12 11:49:43 +02:00
vis2k
aae0a72143
add comment
2019-09-12 11:40:11 +02:00
vis2k
4eedae1d91
rename to ClearAllComponentsDirtyBits
2019-09-12 11:36:49 +02:00
vis2k
ce5484742b
remove trailing whitespace
2019-09-12 11:21:12 +02:00
vis2k
f65f9e47db
add comment
2019-09-12 11:21:04 +02:00
vis2k
81bb208d1d
rename NetworkIdentity.ClearDirtyBits to ClearAllDirtyBits because that's what it does. It doesn't just clear some, it always clear all no matter what.
2019-09-12 11:20:27 +02:00
vis2k
584cda0508
consistent indentation with comment below
2019-09-12 10:45:27 +02:00
MrGadget
1b37a2160e
Room Game Player Camera Restore ( #1075 )
...
Restore camera when Game Player is destroyed
2019-09-12 10:15:01 +02:00
MrGadget
5b9752558e
Put all RoomPlayer's in DDOL ( #1074 )
...
* Put all RoomPlayer's in DDOL
* Simplify by using pattern matching
2019-09-12 10:14:44 +02:00
MrGadget
0bd898dc32
doc: Add XML comments to Custom Attributes ( #1071 )
...
* Add XML comments to Custom Attributes
* We don't throw errors, just display them
2019-09-11 23:23:33 -05:00
MrGadget
650f9caa50
Remove privates ( #1072 )
2019-09-11 23:07:44 -05:00
MrGadget
4ac4c06135
Don't reload offline scene ( #1066 )
...
* Don't reload offline scene
Check if we're already in the offline scene before calling ClientChangeScene to the offline scene.
* Update NetworkManager.cs
2019-09-11 10:07:35 +02:00
MrGadget
0e95016e95
Lobby to Room ( #1065 )
...
* Change Lobby to Room with Obsoletes
* Changed folder from Lobby to Room
* Updated docs
* reverted leftover debu.log line
* Fixed OfflineGUI
* Changed the obsolete classes to inherit from the new ones.
* Fixed SyncVar hook
2019-09-11 10:06:25 +02:00
MrGadget
b3030aff85
Add check for sceneMode ( #1054 )
...
* Add check for sceneMode
* Added comment
2019-09-10 17:36:02 +02:00
vis2k
913d503fda
Revert "Inserted blank lines where appropriate"
...
This reverts commit af84a1730b
.
2019-09-05 19:45:25 +02:00
MrGadget
c84c3892bc
Reset Start Position Index ( #1058 )
2019-09-05 10:45:23 -05:00
MrGadget
da8b2f1d59
Updated xml comments
2019-09-05 09:55:08 -04:00
MrGadget
af84a1730b
Inserted blank lines where appropriate
2019-09-05 09:52:49 -04:00
Paul Pacheco
87385628f0
fix: code generation works with il2cpp again ( #1056 )
2019-09-04 10:26:06 -05:00
Paul Pacheco
c00bb2d81d
No need to read symbols ( #1055 )
...
Should speed up build slightly.
If user has old symbols we don't care, so don't give an error.
2019-09-04 10:25:53 -05:00
MrGadget
ddd51e577e
Don't call Ready if we're ready already ( #1049 )
...
* Fix typo
* Check ClientScene.ready
2019-09-04 10:29:48 +02:00
Paul Pacheco
5aac362f07
Remove unused usings
2019-09-03 20:39:30 -05:00
Paul Pacheco
463bdfa2fa
Remove unnecesary usings
2019-09-03 20:37:11 -05:00
Paul Pacheco
4ef680a474
fix: suppress warning on standalone build #1053
2019-09-03 18:09:30 -05:00
Paul Pacheco
13ca6b6542
Remove unnecesary using
2019-09-03 18:01:17 -05:00
Paul Pacheco
34e1f45615
Remove redundant tostring
2019-09-03 18:00:45 -05:00
Paul Pacheco
e939b9734d
Remove redundant castings
2019-09-03 18:00:18 -05:00
Paul Pacheco
00eb23aa01
fix: error with missing assemblies ( #1052 )
...
* fix: error with missing assemblies
During first import, the weaver will be called before all assemblies
are built. No need to look for custom readers and writers if the assemblies
are not built.
fixes #1051
* forgot using
2019-09-02 23:46:27 -05:00
Paul Pacheco
74faf2a95b
fix: missed ushort reader/writer
2019-09-02 12:17:56 -05:00
MrGadget
68ce6327bc
Updated Pong 2 ( #982 )
...
* Turned off Simulated & Set Transform Interval to zero
* Set sync interval to zero
* Removed ballPrefab field
* Cached RigidBody & simplified FixedUpdate
* Cached RigidBody and Moved Start code to OnStartServer
* Scene file updated
* Updated Scene file again
* Moved comments and fixed typos
* Eliminated GetComponent in code
* Assigned Rigidbody2d in inspector of prefabs
2019-09-02 19:06:04 +02:00
Paul Pacheco
b45afad641
feat: custom reader/writer via extension methods ( #1047 )
...
* Remove hardcoded writers from weaver
* Remove hardcoded readers from weaver
* Remove unused stuff
* cleanups
* Cleanup some comments
* remove unused import
* Update Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs
* Improve comments a bit
* small cleanups
* Remove redundant private keyword
* Remove unnecesary blank space
* Remove unused field
* Measure how long it takes to find the readers and writers
* Find all extension methods for readers and writers
* Get rid of debugging log
* Don't comment obvious stuff
* Don't swallow exception
* only scan static classes for extension methods
* Add unit test for custom readers and writers
* Update Assets/Mirror/Editor/Weaver/Weaver.cs
* Update Assets/Mirror/Runtime/NetworkWriterExt.cs
* Update ReaderWriterProcessor.cs
* Renamed to avoid abreviations
* Move the extensions inside the same .cs
* Update NetworkReader.cs
* Update NetworkWriter.cs
2019-09-02 18:57:45 +02:00
Paul Pacheco
e0b66db335
Link to non obsolete methods in xmldocs
2019-08-31 16:12:25 -05:00
Paul Pacheco
a61635424f
Remove unncesary casting
2019-08-31 14:48:59 -05:00
Paul Pacheco
4638342168
Remove unnecesary casting
2019-08-31 14:47:19 -05:00
Paul Pacheco
32b72c959d
use compound assignment
2019-08-31 14:46:12 -05:00
Paul Pacheco
42b635346a
linting
2019-08-31 14:44:53 -05:00
Chris Langsenkamp
438dbfdf03
Fixed typo
2019-08-31 13:12:30 -04:00
Paul Pacheco
ae7fd90f1f
use array segment for reading string
2019-08-30 23:16:30 -05:00
Paul Pacheco
7f8840c9b6
refactor to use arraysegment
2019-08-30 23:12:51 -05:00
Paul Pacheco
702b183034
Removed more unused variables
2019-08-30 21:49:26 -05:00
Paul Pacheco
bd44d35bae
Use dfault uint64 writer
2019-08-30 21:46:12 -05:00
Paul Pacheco
cab08b1b5a
Use default int32 writer
2019-08-30 21:42:53 -05:00
Paul Pacheco
3181b4a5d4
Use default uint64 reader
2019-08-30 21:39:50 -05:00
Paul Pacheco
e389f62c2d
Use default reader for uint32
2019-08-30 21:37:19 -05:00
Paul Pacheco
609480208c
use default int32 reader
2019-08-30 21:35:00 -05:00
Paul Pacheco
a5d4f46980
test: fix invalid unit test
2019-08-30 17:56:42 -05:00
Chris Langsenkamp
4a78288c92
Updated Comments
2019-08-30 13:48:32 -04:00
vis2k
c6d86b301b
feat: component based SyncToOwner, fixes #39 ( #1023 )
...
* adjust comments
* NetworkBehaviour.syncMode
* show in Editor
* feat: component based SyncToOwner, fixes #39
* rename to Observers
* rename writers and comments too
* SendToReady old signature version
* shorter syntax
* fix segment write length
* fix NullReferenceException for local player
* update comment
* support runtime syncMode changes
* add a test
* remove comments
* UL suffix to avoid cast
* UL suffix
* remove empty line
* OnSerializeAllSafely returns how many components were written. MirrorUpdate only sends to owner/observer if anything written.
* fix tests
2019-08-26 15:21:59 +02:00
Chris Langsenkamp
9e1cb624ac
Replace <T> with {T} for XML Docs Parser
2019-08-25 22:23:55 -04:00
Chris Langsenkamp
080bcb0a31
Updated HelpURL links
2019-08-25 22:10:00 -04:00
Paul Pacheco
614f4bc875
Fix xmldoc in NetworkTime
2019-08-25 08:30:44 -05:00
Paul Pacheco
4730b137cf
Fix issue doc.csproj conflicting with other assemblies
2019-08-24 15:04:40 -05:00
Paul Pacheco
e1561bda02
Add mea for doc project
2019-08-24 12:36:25 -05:00
Paul Pacheco
35fee94d56
docs: switch to docfx for documentation ( #1026 )
...
* Moved doc files to docfx folder
* load csproj
* doc generation
* Run docfx
* Add docfx
* Deploy docs to mirror-networking.com
* use deploy phase
* deploy whole generated site
* Fixed the semantic release command
* Is last \ required?
* show debug log
* using lftp for site deploy
* Testing lftp
* Show current folder
* try -e command option
* Show me the files
* use plain ftp
* use choco install instead of cinst
* fix ssl certificate validation
* fix username
* Upload site to xmldocs folder
* no need to archive docs
* No need for debug output
* Fix file permissions
* show me .htaccess
* Show me contents
* Wipe out folder to fix permissions
* Set file permissions
* Fix file permissions
* complete toc list
* Migrated intro page
* Remove old docs
* Update link to docs
* Add link to github
* Only update docs for stuff in master
* This is a powershell command
* Update doc/articles/Concepts/Communications/RemoteActions.md
* Update doc/articles/Concepts/VisibilityCustom.md
* Update doc/articles/Concepts/Authority.md
* Update doc/articles/Concepts/GameObjects/SpawnObjectCustom.md
* Update doc/articles/Concepts/Authority.md
* Update doc/articles/Classes/SyncVars.md
* No need to run semver twice
2019-08-24 10:20:33 -05:00
Paul Pacheco
9e283b1f9b
refactor: syntax fixes
2019-08-18 16:30:53 -05:00
Paul Pacheco
1070fee325
refactor: Unused parameter
2019-08-18 16:23:10 -05:00
Paul Pacheco
0bf6453aff
refactor: fix warnings
2019-08-18 16:22:40 -05:00
Paul Pacheco
216c0cb65c
docs: Document the network time class
2019-08-18 16:20:17 -05:00
Paul Pacheco
4bc4ec86ea
docs: proper reference to non obsolete method
2019-08-18 16:05:49 -05:00
Paul Pacheco
12f338e142
docs: proper reference to non obsolete method
2019-08-18 16:05:03 -05:00
Paul Pacheco
325d30f42a
docs: proper reference to non obsolete method
2019-08-18 16:04:30 -05:00
Paul Pacheco
d441c2faf9
refactor: unused parameters
2019-08-18 15:54:05 -05:00
Paul Pacheco
f78510a6a9
refactor: unused parameters
2019-08-18 15:53:05 -05:00
Paul Pacheco
5e2914be3c
refactor: unused parameter
2019-08-18 15:52:10 -05:00
Paul Pacheco
2bae240534
doc: fix parameter name
2019-08-18 15:50:26 -05:00
Paul Pacheco
d08dd0328e
refactor: handlers dictionaries should be readonly
2019-08-18 15:49:46 -05:00
Paul Pacheco
9e3ecc1ced
perf: remove network transform allocation
2019-08-17 13:22:11 -05:00
vis2k
812c6434e2
remove empty line
2019-08-12 20:58:49 +02:00
vis2k
48785b594c
remove empty line
2019-08-12 20:02:10 +02:00
Paul Pacheco
62d1887e62
feat: #869 support structs in other assemblies ( #1022 )
2019-08-12 19:25:23 +02:00
Paul Pacheco
bbe4ac8c19
Use explicit type
2019-08-11 12:56:39 -07:00
Paul Pacheco
63e958e8a8
sceneids should be readonly
2019-08-11 12:56:09 -07:00
Paul Pacheco
f79c05c109
Remove redundant field initializer
2019-08-11 12:55:40 -07:00
Paul Pacheco
ab44290ca8
refactor: remove redundant else
2019-08-11 12:54:39 -07:00
Paul Pacheco
9ef34701d9
refactor: cmdDelegate dictionary should be readonly
2019-08-11 12:53:32 -07:00
Paul Pacheco
1869c15173
doc: fix see tag
2019-08-11 12:52:32 -07:00
Paul Pacheco
75b4a276f8
Remove pending owner thing ( #1018 )
2019-08-11 20:28:39 +02:00
MrGadget
cd88c69df9
Update NetworkManager.cs
...
Added missing XML comment
2019-08-11 13:18:16 -04:00
Paul Pacheco
38ffce2c63
refactor: GetDirtyMask is more testable
2019-08-11 07:33:21 -07:00
Paul Pacheco
b6c0b86f3d
refactor: simplify dirty bit cleaning
2019-08-11 06:47:02 -07:00
MrGadget
5c1440b2f0
Added virtual OnServerChangeScene just like OnClientChangeScene so devs can override to do prep before the change. ( #1020 )
2019-08-10 15:49:03 -07:00
Paul Pacheco
236afa3c7e
test: add test for syncvar synchronization ( #1019 )
...
* test: add test for syncvar synchronization
* made methods internal and expose internal to the tests
2019-08-10 15:32:27 -07:00
Paul Pacheco
f27fd0bdc5
fix: hooks in host mode can call each other ( #1017 )
2019-08-10 15:08:20 -07:00
Paul Pacheco
6dd135088b
fix: Rebuild observers when we switch scenes, fixes #978 ( #1016 )
2019-08-10 15:08:00 -07:00
Paul Pacheco
8c6789db0c
doc: document the transport class ( #1014 )
...
* doc: document the transport class
* Update Assets/Mirror/Runtime/Transport/Transport.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/Transport/Transport.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/Transport/Transport.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/Transport/Transport.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Update Assets/Mirror/Runtime/Transport/Transport.cs
Co-Authored-By: MrGadget <chris@clevertech.net>
* Apply suggestions from code review
Co-Authored-By: MrGadget <chris@clevertech.net>
* Break summary into paragraphs
* Update Assets/Mirror/Runtime/Transport/Transport.cs
2019-08-10 06:38:00 -07:00
MrGadget
0283243f95
Internalize OnServerAddPlayer Safety Checks ( #1002 )
...
* Move safety checks to internal method
* Added autoCreatePlayer to the safety checks
2019-08-10 10:39:20 +02:00
Danil Gabaidullin
80e9d25e53
Animator multiple layers support. ( #983 )
...
* NetworkAnimator update. Support multiple layers.
Just added layerId to sync multiple animator layers.
1 layer = 1x performance.
2 layers = ~0.5x performance.
etc.
Also you can change int to byte to save traffic a bit :)
* Animator updated. WriteParameters(...) args fix.
* fixed variable name
* Updated writer names
2019-08-08 10:45:40 +02:00
MrGadget
2fabc59f6a
Update Readme.txt
2019-08-07 19:07:13 -04:00
MrGadget
bb45b72953
Don't increment counter in constructor ( #1012 )
2019-08-07 16:42:27 +02:00
MrGadget
2dc8c1ee8c
Remove redundant code ( #1011 )
2019-08-07 06:43:35 -07:00
Matej Zajo Kralik
de61494c9e
Synchronize scale with NetworkTransformBase ( #1007 )
...
* Synchronize scale with NetworkTransformBase
Previously only position and rotation were synchronized,
with this commit scale is synchronized similarly to position.
* Update NetworkTransformBase.cs
2019-08-05 15:23:06 +02:00
MrGadget
178d1336f6
Use isHeadless ( #1005 )
2019-08-05 11:07:42 +02:00
MrGadget
effb56fbea
Additive Example Camera Fix ( #1004 )
...
* Restore Main Camera OnDisable
* Need isLocalPlayer Check
2019-08-04 19:35:48 +02:00
MrGadget
602c4f8f1a
Simplify ClientChangeScene ( #1003 )
2019-08-04 19:35:02 +02:00
MrGadget
b9951f9ca7
Fix unused ex warnings in websockets ( #1001 )
2019-08-04 19:29:25 +02:00
MrGadget
2d25c4b06f
Merge pull request #995 from MrGadget1024/XMLComments
...
XML Summary Comments
2019-08-03 09:45:56 -04:00
Chris Langsenkamp
147341ec26
NetworkManager
2019-08-01 02:25:47 -04:00
Chris Langsenkamp
2ad0b5dd41
NetworkConnection
2019-08-01 02:18:59 -04:00
Chris Langsenkamp
4062f48561
NetworkBehaviour
2019-08-01 02:12:48 -04:00
Chris Langsenkamp
7ab23f3529
NetworkAnimator
2019-08-01 02:09:39 -04:00
Chris Langsenkamp
c23b0b89c4
NetworkIdentity
2019-08-01 02:08:11 -04:00
Chris Langsenkamp
30afb60eca
NetworkIdentity
2019-08-01 01:14:35 -04:00
Chris Langsenkamp
c2195707c7
NetworkLobbyManager
2019-08-01 01:13:38 -04:00
Chris Langsenkamp
133b15eedb
NetworkServer
2019-08-01 01:12:43 -04:00
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
Paul Pacheco
a8599c1af2
feat: Show compile time error if overriding unused OnServerAddPlayer ( #682 )
...
* remove obsolete OnServerAddPlayer
BREAKING CHANGE: Remove obsolete OnServerAddPlayer
Any person that overrides this method has a broken game. These methods are never called anywhere.
The user gets a warning because they are overriding an obsolete method, which might get ignored if they have lots of other warnings. They would run their game and their game would not work at all. No errors.
By removing these methods, users that override these methods will get a compile time error instead. So they cannot ignore this error and they will fix it.
* Method is no longer available in NetworkLobbyManager
2019-03-28 11:36:13 +01:00
Paul Pacheco
8dea50ed18
fix: call Obsoleted OnStartClient ( #681 )
2019-03-27 18:13:59 -05:00
MichalPetryka
468ec80dbb
Remove useless method ( #680 )
2019-03-27 17:23:37 -05:00
rodolphito
375303297c
Removed internal access modifier. ( #675 )
...
good catch, this should be private
2019-03-27 17:22:21 -05:00
rodolphito
40d2ec54e5
This method seems pretty redundant, could just be called directly. ( #677 )
2019-03-27 13:06:42 -05:00
MrGadget
49f39f9c09
Updated Obsolete comment and code to remove singleton ( #661 )
...
* Updated Obsolete comment and code to remove singleton
* Update NetworkClient.cs
* Update NetworkClient.cs
* Update NetworkClient.cs
2019-03-27 15:13:25 +01:00
rodolphito
1feff9d749
Removed useless comment. ( #676 )
2019-03-27 13:56:59 +01:00
rodolphito
6edfd3ddf1
Removed more internals. ( #673 )
2019-03-27 13:37:12 +01:00
rodolphito
ba298c74b0
Style guidelines say these are bad. ( #672 )
2019-03-27 13:20:36 +01:00
rodolphito
57066a6003
These can be private. ( #669 )
2019-03-27 13:13:27 +01:00
rodolphito
4897edd76a
More internal access modifier removals ( #671 )
2019-03-27 13:13:11 +01:00
rodolphito
9be7426efa
Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. ( #668 )
2019-03-27 12:04:07 +01:00
rodolphito
86c1942310
Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. ( #667 )
2019-03-27 12:03:37 +01:00
rodolphito
595039865f
Removed duplicated address storage. ( #664 )
...
* Removed duplicated address storage.
* Removed the obsoletion as per vis' request.
2019-03-27 10:27:41 +01:00
rodolphito
c289ffb440
Remove proxy methods for setting playerController. ( #665 )
...
* Deprecate proxy methods for setting playerController.
* shortened obsoleted methods.
* This isnt actually public facing, its internal. Obsoletion is unnecessary, plain removal is ok.
2019-03-27 10:26:45 +01:00
uwee
f4cdfbf952
Remove IsClientConnected ( #663 )
...
* remove IsClientConnected
no longer needed now that NetworkClient is static
* removed in other scripts also
* marked as obsolete
2019-03-27 09:15:03 +01:00
MrGadget
d7306986b6
Updated Lobby Example Scenes Lighting ( #662 )
2019-03-26 17:49:56 +01:00
MrGadget
d2868646fa
SyncVar Updates ( #660 )
...
* Change SyncVar hooks to use `nameof`
I intentionally left the test for missing hook as a literal string because it won't compile otherwise.
* Removed unnecessary property value set from hook
2019-03-26 15:40:28 +01:00
uwee
68f63b5f69
bool InActiveScene not referenced in any script? ( #656 )
...
* code is not referenced in any script?
* fully remove code
2019-03-26 13:58:05 +01:00
Paul Pacheco
2d63ee1318
fix: Set syncvar variables after calling the hook ( #659 )
...
Previously, during deserialize, Mirror either called the hook for a syncvar or it set the variable, but never both. So users had to set the variable inside the hook.
```cs
class Player : NetworkBehaviour {
[SyncVar(hook=nameof(OnVarChanged))]
public int myvar;
public void OnVarChanged(int newvalue) {
Debug.Log("Got new value " + newvalue);
Debug.Log("Old value is " + myvar);
// with this pull request the following line is no longer needed
// the weaver will do this after the hook finishes
// this.myvar = newvalue;
}
}
```
fix: Hook not working with NetworkIdentity or GameObjects
Deserializing NetworkIdentity or GameObjects was broken, it called the hook only if there was no hook, and it saved the variable only if there was a hook.
2019-03-26 07:15:25 -05:00
Paul Pacheco
4d74f555b1
Update Assets/Mirror/Runtime/NetworkClient.cs
...
Co-Authored-By: vis2k <info@noobtuts.com>
2019-03-26 12:16:57 +01:00
vis2k
1879f5ecdc
Add [Obsolete] for compatibility
2019-03-26 12:16:57 +01:00
vis2k
9bc1dc1e85
NetworkClient class made static
2019-03-26 12:16:57 +01:00
vis2k
912572d6fe
NetworkClient.ConnectLocalServer: use the same order as Connect
2019-03-26 12:16:57 +01:00
vis2k
7bc320d098
LocalClient class moved into NetworkClient
2019-03-26 12:16:57 +01:00
vis2k
31836c16d1
NetworkClient.RemoveTransportHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
4dbaff8ac1
NetworkManager.StartClient/StartHost don't return NetworkClient anymore
2019-03-26 12:16:57 +01:00
vis2k
d1d006e6d7
NetworkClient.Connect made static
2019-03-26 12:16:57 +01:00
vis2k
080bf2eaf0
NetworkClient.InitializeTransportHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
32ed62f82b
NetworkClient.OnError made static
2019-03-26 12:16:57 +01:00
vis2k
461ba0b036
NetworkClient.OnDisconnected made static
2019-03-26 12:16:57 +01:00
vis2k
60083ff72d
NetworkClient.OnDataReceived made static
2019-03-26 12:16:57 +01:00
vis2k
42bceb25d9
NetworkClient.OnConnected made static
2019-03-26 12:16:57 +01:00
vis2k
493bf7fa5f
NetworkClient.RegisterSystemHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
bc6c2542f6
NetworkClient.UnregisterHandler made static
2019-03-26 12:16:57 +01:00
vis2k
9eac983872
. NetworkManager.RegisterClientMessages doesn't require NetworkClient parameter anymore
2019-03-26 12:16:57 +01:00
vis2k
712aecb452
NetworkClient.REgisterHandle made static
2019-03-26 12:16:57 +01:00
vis2k
ba00554e0c
NetworkClient.GetRTT made static
2019-03-26 12:16:57 +01:00
vis2k
4abc58b136
NetworkClient.Send(msgId, msg) made static
2019-03-26 12:16:57 +01:00
vis2k
cd56c6a6f7
NetworkTime.UpdateClient doesn't require NetworkClient anymore
2019-03-26 12:16:57 +01:00
vis2k
8c125d2fd3
NetworkClient.Send made static
2019-03-26 12:16:57 +01:00
vis2k
558e1d8754
NetworkClient.SetHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
180d3f8cf4
NetworkClient.isConnected made static
2019-03-26 12:16:57 +01:00
vis2k
604c205025
NetworkClient.serverIp made static
2019-03-26 12:16:57 +01:00
vis2k
882a7d5ba8
NetworkClient.connection made static
2019-03-26 12:16:57 +01:00
vis2k
f351a8a6d4
NetworkClient.connectState made static
2019-03-26 12:16:57 +01:00
vis2k
006d5d3bc8
NetworkClient.handlers made static
2019-03-26 12:16:57 +01:00
rodolphito
3a8fa3f571
Remove internal access modifier. ( #658 )
2019-03-26 12:09:43 +01:00
rodolphito
a96417112d
Use ulong instead of uint to support up to 64 animator parameters. ( #655 )
...
* Use ulong instead of uint to support up to 64 animator parameters.
* Split onto new line as Paul asked
2019-03-26 07:57:51 +01:00
uwee
65eaba1fe0
fix : #651 GetSceneAt assumes default scene ( #654 )
...
Changed to GetActiveScene
2019-03-26 07:57:31 +01:00
Paul Pacheco
8c93f31b80
refactor: Load parameters right before function call
2019-03-25 23:13:52 -05:00
vis2k
ff909bf830
Telepathy license file included
2019-03-25 20:03:27 +01:00
vis2k
14807f6ef7
add comment
2019-03-25 16:20:17 +01:00
vis2k
13bb748603
fix: Revert "NetworkClient.Shutdown: call ClientScene.Shutdown, otherwise it's never called" - caused client's player to not be removed from scene after disconnecting
...
This reverts commit e1e7b3132e
.
2019-03-25 16:19:22 +01:00
rodolphito
d483901432
Use PackedUInt for dirty bits for bandwidth ( #649 )
2019-03-25 13:13:14 +01:00
uwee
4c7c97bf70
reset netId counter to 1 on NetworkServer.Shutdown ( #645 )
2019-03-25 05:37:28 -05:00
rodolphito
6120a8e082
Removed unused parameter from NetworkAnimator. ( #648 )
2019-03-25 08:07:45 +01:00
Paul Pacheco
e2a6ce9811
feat: Add weaver support for Vector2Int and Vector3Int ( #646 )
2019-03-24 16:04:13 -05:00
vis2k
7836433b4f
Local Connection's connectionId is now set to 0 inside of their constructors, instead of doing it in LocalClient
2019-03-24 21:16:55 +01:00
vis2k
5f7c4d48b4
NetworkServer.AddLocalClient renamed to SetLocalConnection because that's what it does. The connection is created in LocalClient now too, this way NetworkServer doesn't need to depend on LocalClient(!)
2019-03-24 21:15:05 +01:00
vis2k
829da79288
LocalClient.InternalConnectLocalServer sets connectionId to 0 directly instead of getting it from NetworkServer.AddLocalClient (which shows an error message if failed anyway)
2019-03-24 21:07:41 +01:00
vis2k
56c163d9cd
NetworkServer.RemoveLocalClient renamed to RemoveLocalConnection because NetworkServer only keeps a local connection, not a local client
2019-03-24 21:07:41 +01:00
uwee
6db11b298b
Add the name of the Message back to the debug
...
The random int representing the Message is less human readable.
2019-03-24 14:50:13 -05:00
vis2k
ca2c72aee8
NetworkServer.s_LocalConnection replaced with .localConnection private setter
2019-03-24 20:46:34 +01:00
Paul Pacheco
48674151f0
perf: don't varint bytes and shorts
2019-03-24 14:45:03 -05:00
vis2k
bdf12c85d0
fix : #640 InternalReplacePlayerForConnection calls SpawnObserversForConnection now too
2019-03-24 19:41:41 +01:00
vis2k
a2d6317642
fix : #573 NullReferenceException because destroyed NetworkIdentities were never removed from sceneIds dict
2019-03-24 19:28:25 +01:00
rodolphito
1e5fc3cde5
Made dirty bits not rely on NetworkWriter position manipulation hackery. ( #636 )
...
* Made dirty bits not rely on NetworkWriter position manipulation hackery.
* Renamed GetDirtyBits to NextDirtyBits, as discussed with Paul.
* Expanded one line ifs.
2019-03-24 12:43:39 -05:00
Paul Pacheco
a495f66fc1
refactor: configure frame rate in a virtual method ( #638 )
...
Moved frame rate configuration into a virtual method so that people can override it and we reduce StartServer complexity
Fixes #567
2019-03-24 08:58:11 -05:00
vis2k
2d492607c8
pong example: ball is only simulated on server now
2019-03-24 14:38:22 +01:00
vis2k
e521a20052
fix : #573 (part 2) NetworkManager detects additive scene loads and respawns objects on server/client again
2019-03-24 13:24:29 +01:00
vis2k
c1af84e6bf
fix : #573 (part 1) NetworkScenePostProcess handles NetworkIdentities of all scenes except DontDestroyOnLoad. this way it works for additively loaded scenes too.
2019-03-24 13:24:29 +01:00
vis2k
603dfa1fe9
don't use continue and improve comments
2019-03-24 13:24:29 +01:00
vis2k
051cd7cf66
add comment
2019-03-24 13:24:29 +01:00
vis2k
bce7c54fa1
NetworkScenePostProcess: only set inactive if this was actually a valid scene object
2019-03-24 13:24:29 +01:00
rodolphito
b3595d3f5d
Code simplification and optimization. ( #635 )
2019-03-24 10:47:14 +01:00
Zac North
7d21bded9a
feat(syncvar): Add SyncDictionary ( #602 )
...
* Added basic SyncDictionary support, no support for structs yet
* Fixed TryGetValue usage
* Removed extraneous hardcoded SyncDictionary type
* Added a couple basic tests, more coming
* Added 4 more tests
* Added two tests and SyncDictionary now bubbles item to Callback on Remove (both Remove cases)
* Added the remainder of tests
* Added basic documentation about SyncDictionaries on StateSync.md page
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Remove null-check when setting value directly (and updated expected test behaviour)
* fix: Provide default implementation for SyncDictionary serializers
* feat: Add Weaver support for syncdictionary
* Fix minor issue with Set code and made test use Weaved serialization instead of manual
* Added a new test for bare set (non-overwrite)
* Added another test for BareSetNull and cleaned up some tests
* Updated SyncDictionary documentation on StateSync.md
* Update docs with SyncDictionary info
* Update SyncDictionary docs wording
* docs: document the types and better example
* Add two SyncDictionary constructors
* Removed unnecessary initialization
* Style fixes
* - Merged many operation cases
- Fixed Contains method
- Added new test to test contains (and flag its earlier improper usage)
- Use PackedUInt32 instead of int for Changes and Counts
* - Simplify "default" syntax
- Use Rodol's remove method (faster)
- Don't use var
* Removed unnecessary newline, renamed <B, T> to <K, V> per vis2k, corrected wording of InvalidOperationException on ReadOnly AddOp
* Code simplification, style fixes, docs example style fixes, newly improved implementation for CopyTo that fails gracefully
2019-03-24 10:18:31 +01:00
rodolphito
fea46b801d
Remove NetworkAnimatorEditor and animator parameter mask. ( #633 )
2019-03-24 09:39:51 +01:00
vis2k
67d715fe74
fix: Telepathy updated to latest version: protect against allocation attacks via MaxMessageSize. Can be configured in the TelepathyTransport component now.
2019-03-23 20:34:48 +01:00
Zac North
b0af876221
fix(tests): Added missing SyncListByteValid test file ( #634 )
...
* Added missing SyncListByteValid test file (passing)
* Added a missing newline
2019-03-23 18:40:38 +01:00
MichalPetryka
1595fb07b1
PreprocessorDefine rework ( #626 )
...
perf: speed up preprocessor define
2019-03-23 06:59:35 -05:00
vis2k
1bf2f9ee56
Update List Server demo text
2019-03-23 12:51:39 +01:00
vis2k
4eb01da0c1
update welcome message
2019-03-22 17:19:05 +01:00
vis2k
fa04185fa8
remove empty line
2019-03-22 14:08:59 +01:00
vis2k
c194771084
ClientScene.DestroyAllClientObjects simplified: use .Values
2019-03-22 14:05:47 +01:00
vis2k
6e11429699
NetworkClient.Shutdown made static too. ShutdownAll made obsolete.
2019-03-22 13:56:43 +01:00
vis2k
1d94464023
NetworkClient.ShutdownAll calls .Shutdown
2019-03-22 13:54:20 +01:00
vis2k
e1e7b3132e
NetworkClient.Shutdown: call ClientScene.Shutdown, otherwise it's never called
2019-03-22 13:53:28 +01:00
vis2k
227b0a71d1
tanks example namespaces updated
2019-03-22 13:29:24 +01:00
vis2k
c5b4211ac7
list server examples namespace changed
2019-03-22 13:28:08 +01:00
vis2k
5c00577746
fix : #609 by spawning observers in NetworkServer.AddPlayerForConnection after setting the controller. There is no point in trying to spawn with a null controller in SetReady, because by definition no one can observer something that is null. ( #623 )
2019-03-22 12:50:35 +01:00
Paul Pacheco
b7e977a7a3
synclist code generator is now reusable ( #624 )
...
* refactor: Made serializer generation reusable
* refactor: SyncList code generator is reusable for other structs
2019-03-22 06:44:57 -05:00
vis2k
1d166c699a
add comment
2019-03-22 12:24:22 +01:00
vis2k
694185b756
NetworkServer.SpawnObserversForConnection helper function instead of doing it all in SetClientReady
2019-03-22 12:23:33 +01:00
vis2k
009943f368
remove outdated comment
2019-03-22 12:10:13 +01:00
vis2k
c3bd7d6e07
NetworkServer.SetClientReady: get rid of 'continue'
2019-03-22 12:09:22 +01:00
vis2k
400bb91821
NetworkServer.SetClientReady: remove unnecessary null check because we don't have one in the above foreach either, and we don't have them anywhere else for NetworkIdentity.spawned because OnDestroy removes objects from it before they become null. The only way to cause this would be by calling Destroy(GetComponent<NetworkIdentity>()) - which no one does, and if someone does it then it's fine to get an exception here.
2019-03-22 12:08:47 +01:00
vis2k
9567daedba
add comments
2019-03-22 12:06:13 +01:00
vis2k
b869e3af99
improve comment
2019-03-22 12:04:25 +01:00
vis2k
c176da7bc3
NetworkServer.SetClientReady: use if+else instead of if + early return
2019-03-22 12:00:16 +01:00
vis2k
0e8b442cad
add some ocmments
2019-03-22 11:59:12 +01:00
vis2k
f6a6440294
NetworkServer.SetClientReady: move isReady=true upwards
2019-03-22 11:57:27 +01:00
vis2k
47d5ee976e
remove unused variable
2019-03-22 11:53:42 +01:00
Paul Pacheco
6f19489721
feature(synclist): allow SyncList of primitive types ( #622 )
...
* feature(synclist): allow SyncList of primitive types
As it turns out this never really worked:
```cs
class SyncListByte : SyncList<byte> {};
```
You had to write your own serializeItem / deserialize item for native types.
This change lifts the restriction, now you can use a synclist of anything that mirror can serialize/deserialize
* fix: fix unit tests error messages
2019-03-22 05:51:20 -05:00
vis2k
aa5e5a104f
ClientScene.s_PendingOwnerNetIds converted to HashSet
2019-03-22 10:10:53 +01:00
vis2k
0d6b03989a
NetworkServer.InternalAddPlayerForConnection moved into AddPlayerForConnection because there is no reason to keep it in an internal method anymore, since NetworkServer is static now
2019-03-22 10:04:14 +01:00
vis2k
fb2131207c
NetworkServer.InternalAddPlayerForConnection: reuse 'identity' for log message
2019-03-22 10:03:00 +01:00
vis2k
4f53f37dc8
NetworkServer.InternalAddPlayerForConnection: rename playerGameObject parameter for consistency
2019-03-22 10:02:30 +01:00
vis2k
75e51513db
added the log message again too
2019-03-22 09:58:04 +01:00
vis2k
1a55c3d52d
NetworkManager: move OnServerAddPlayerInternal code into OnServerAddPlayer because it was really just the implementation for OnServerAddPlayer moved into another function
2019-03-22 09:53:21 +01:00
vis2k
4b4dd179cc
sort regular and obsolete OnServerAddPlayer functions
2019-03-22 09:51:27 +01:00
vis2k
a39954003a
NetworkManager.RegisterServerMessages for AddPlayerMessage uses OnServerAddPlayer directly instead of wrapping it with a OnServerAddPlayerMessageInternal function
2019-03-22 09:46:14 +01:00
vis2k
fa4efa6683
syntax
2019-03-21 18:12:34 +01:00
vis2k
155764cea8
simplify NetworkIdentity.RebuildObservers
2019-03-21 17:58:15 +01:00
vis2k
f90cdae3c6
fix #384 : duplicating scene objects at runtime is now detected and and error is shown. otherwise the user could instantiate scene objects at runtime, which would then send the sceneId to the client, then the client wouldn't know which of the multiple objects to use for the sceneId, resulting in things getting out of sync.
2019-03-21 11:46:55 +01:00
Zac North
c9eac57ce8
fix: OnClientReady is called and passed the appropriate ready state value in NetworkLobbyPlayer ( #618 )
2019-03-21 02:27:25 -05:00
Martin Evans
28b067d3cd
refactor: Generic IMessageBase
to allow struct message types ( #619 )
...
* - Added a `IMessageBase` as an interface to `MessageBase`. Existing messages which inherit `MessageBase` (including ones which do not implement Serialize/Deserialize and rely on the weaver) will continue to work in exactly the same way as before!
- Modified any methods which were generic `T where T : MessageBase` to be `T where T : IMessageBase`. this does not change things at all for all existing usages of the method.
These two changes allow end users to implement IMessageBase as a `struct` instead of `MessageBase` as a `class`, so they are no longer forced to allocate message objects in their own code.
* Update .gitignore
* Update Messages.cs
* Update MessageBaseTests.cs
* Update MessageBaseTests.cs
* Update MessageBaseTests.cs
2019-03-20 19:44:42 -05:00
Paul Pacheco
9d043182bf
feature: SyncList now support structs ( #614 )
...
Previously, if you wanted a synclist of structures, you would do: SyncListSTRUCT<MyStruct>
Now you can use SyncList<MyStruct>
SyncListSTRUCT is left there, but obsolete
2019-03-20 12:45:46 +01:00
vis2k
22640b5e62
Mirror List Server example ( #611 )
...
feature: Mirror List Server example
2019-03-20 09:38:53 +01:00
Anthony Eckert
00961ccc9c
feature: Add NoRotation to NetworkTransform ( #616 )
...
This allows you to leave rotation out of the NetworkTransform if you only need position.
Right now if you don't need sync rotation and set compression to Lots, it can move your object in ways not expected. This forces you to use no compression as a fix. Using more bandwidth for something you don't need. I think this is all that is needed, tested it in my game and it works.
2019-03-19 23:46:33 -05:00
Paul Pacheco
80bce0a626
refactor: rename SyncObjectProcessor -> SyncObjectInitializer
...
The name SyncObjectProcessor is confusing because it does not process syncobjects. Instead it initializes syncobjects in a NetworkBehaviour.
this avoids the confusion with SyncListStructProcessor, that does process synclists to add serialization methods
2019-03-19 08:26:03 -05:00
Paul Pacheco
6e51e69e3d
refactor: rename SyncListProcessor -> SyncListInitializer
...
SyncListProcessor is a very confusing name, it does not process synclists at all, instead it initializes synclists in the network behaviour.
This is more confusing especially since SyncListStructProcessor does process the synclists to add serialization methods, and both of them normally work
in tandem in different parts of the code
2019-03-19 08:23:28 -05:00
vis2k
8f8856d320
remove targetrpc first parameter networkconnection test because it's optional now
2019-03-18 13:08:28 +01:00
MichalPetryka
c1707e5917
fix: Don't disconnect host ( #608 )
...
* Don't disconnect host
* Update NetworkConnection.cs
2019-03-18 09:38:51 +01:00
vis2k
ed6a93724f
tanks: projectiles
2019-03-17 22:23:20 +01:00
vis2k
21327065f2
rename Examples/Movement to Examples/Tank
2019-03-17 21:46:53 +01:00
vis2k
97b4e26d8b
movement: add a light to the tank
2019-03-17 21:46:18 +01:00
vis2k
a2165d3278
movement: dirt texture
2019-03-17 21:38:58 +01:00
vis2k
d41c5d0040
movement: adjust camera
2019-03-17 21:31:45 +01:00
vis2k
6a11335050
movement: improve code
2019-03-17 21:30:45 +01:00
vis2k
a773df4905
movement: use animations
2019-03-17 21:30:45 +01:00
vis2k
c0b2d63a8d
movement: rename player to tank
2019-03-17 21:18:57 +01:00
vis2k
13717c8b57
movement: rotate camera
2019-03-17 21:17:20 +01:00
vis2k
fbe2895eab
movement: delete old model
2019-03-17 21:12:49 +01:00
vis2k
14b63e9d10
movement: add some spawn positions
2019-03-17 21:08:52 +01:00
vis2k
477fe61a14
movement example: fix movement in builds by using navmeshagent; use better model (tank)
2019-03-17 21:05:12 +01:00
MichalPetryka
b67b3e4304
fix: Stop calling ClientDisconnect on host ( #597 )
...
* Stop calling ClientDisconnect on host
* Update NetworkConnection.cs
* Update NetworkServer.cs
2019-03-17 19:37:21 +01:00
MrGadget
78504533f3
Fix Scene Handling ( #463 )
...
* Fix Scene Handling
Line 361: Passing false prevents the switch to offline scene...pass true instead to forceReload paramater.
Line 588: Never assume Network Manager is in Scene 0 of Build Settings...it often is not.
* Reverted GetActiveScene
Will make separate PR
* Added code to unwind DontDestroyOnLoad
* Fixed typo in comment
* Removed the unwinding of DDOL
2019-03-17 19:32:49 +01:00
vis2k
7efeaa980c
not public
2019-03-17 14:35:53 +01:00
vis2k
d72a10b4a9
pong: NetworkManagerPong handles ball spawn and despawn
2019-03-17 14:34:59 +01:00
vis2k
7e9b3efa7d
pong: fixed racket spawn position after reconnecting
2019-03-17 14:24:15 +01:00
vis2k
6d8d9f2998
pong: racket uses * Time.fixedDeltaTime
2019-03-17 14:14:22 +01:00
vis2k
a3209add85
pong ball uses continous collision detection and interpolation to fix going through walls
2019-03-17 14:08:08 +01:00
vis2k
f360e5070c
pong ball velocity only starts when both players are connected
2019-03-17 14:07:24 +01:00
vis2k
c956148982
pong ball position centered
2019-03-17 14:02:42 +01:00
vis2k
46dd15d4a4
spawn scene object not found message shows sceneID as hex
2019-03-17 09:54:44 +01:00
MrGadget
f64eb8be0b
Should be fixedDeltaTime in FixedUpdate ( #605 )
2019-03-16 13:15:32 -05:00
MrGadget
d09c7cddc0
Fixed typos ( #604 )
2019-03-16 12:57:17 -05:00
MrGadget
54c964c232
Made Lists available to inheritors ( #603 )
...
* Made Lists available to inheritors
* Update NetworkLobbyManager.cs
Made them public
2019-03-16 15:47:33 +01:00
rodolphito
0b83c9feb9
Add scale to spawn payload. ( #599 )
2019-03-16 11:57:59 +01:00
vis2k
4193574864
[TargetRPC] optional connection parameter for easier usage while still allowing for previous usage ( #592 )
...
* [TargetRPC] optional connection parameter for easier usage while still allowing for previous usage
* allow for parameterless targetrpc too
* syntax
* Add Helpers.ReaderParameters change from HLAPI 2019.2 package just to be sure
2019-03-14 14:52:32 +01:00
vis2k
1824e8db80
sceneID buildIndex byte replaced with scenePath hash and sceneID converted to long to fix #571 , #577
2019-03-14 11:26:19 +01:00
vis2k
ca69cb9c14
log sceneid as hex
2019-03-14 11:15:51 +01:00
vis2k
de9d31f6b6
syntax
2019-03-14 11:01:42 +01:00
vis2k
e962fd2f35
sceneID random generation excludes 0 because 0 is for random sceneIDs
2019-03-14 11:01:12 +01:00
vis2k
62fc738673
Fix sceneID mismatch bug between build (buildIndex=-1) and editor (buildIndex=0) for projects where the scene was not added to build settings list
2019-03-13 18:36:20 +01:00
vis2k
8642056f21
add comments
2019-03-13 18:27:00 +01:00
MichalPetryka
8c41ee2380
Remove a per packet Encoding allocation ( #588 )
...
* Remove a per packet encoding allocation
* Update NetworkReader.cs
* Update NetworkReader.cs
* Update NetworkWriter.cs
* Update NetworkWriter.cs
* Update NetworkReader.cs
2019-03-13 15:53:18 +01:00
MrGadget
ab668962d1
Added Obsoleted Methods ( #590 )
2019-03-13 15:49:43 +01:00
MrGadget
dc0b8d406a
NetworkLobbyManager: Added Obsoleted Method ( #591 )
2019-03-13 15:49:11 +01:00
vis2k
f17ddfec5f
syntax
2019-03-13 14:03:41 +01:00
vis2k
d23facc048
simplify code
2019-03-13 14:01:50 +01:00
vis2k
00a1004b41
Weaver sourcebased hlapi2019.2package ( #587 )
...
* move weaver into assets folder
* disable tests for now
* asmdef
* add logs
* Use UNET's WeaverRunner code, slightly modified to find Mirror assembly
* Use UNET's 2019.2 package Weave function changes
* compiler messages error checked moved into separate function
* fix typo
* syntax
* replace 'var'
* rename
* replace var
* fix log
* update comment
* syntax
* rename to assemblyPath. no need for an extra variable.
* remove extra variable
* fix typo
* remove old code
* don't use .Contains to find Mirror dll. that's crazy. would fail for all DLLs in Mirror folder.
* look for 'this' assembly separately
* separate unityEngine assembly search
* add comment
* move null check up
* move null check upwards
* move outputDirectory down
* check process result properly
* use our previous way to find unity engine dll
* rename to unityEngineCoreModuleDLL again
* improve output directory construction
* move unityengine dll finding upwards
* move foundThisAssembly down, where it is used
* add comments
* split dependency code into separate functions
* add TODO
* store this assembly in a variable
* split dependency search depending on if we found assembly or not
* move usesMirror logic into if and out of 'not found' else
* syntax
* improve order
* GetNonDynamicAssemblyDirectories helper function
* check File.Exists instead of exception
* improve comment
* rename HlapiRuntimeAssemblyName to MirrorAssemblyName
* reuse MirrorAssemblyName
* remove telepathy check
* rename to MirrorRuntimeAssemblyName
* add MirrorWeaverAssemblyName
* reuse name consts
* don't use contains to check if assembly depends on Mirror
* add actions for testing again
* make CompilationFinishedHook public so it can be used by tests
* fix typo
* Mirror.Tests.asmdef references weaver asmdef
* reenable tests
* pass error handlers to Weaver Processing for tests to work
2019-03-13 12:17:04 +01:00
Liu
dea7b58792
Fix network animator doesn't sync float value as expected ( #589 )
...
Maybe we should do float sync when the Abs of newValue - lastValue > 0.001f
2019-03-13 12:15:34 +01:00
vis2k
b0ef89a0d9
resave scenes because of new sceneIDs
2019-03-12 18:45:42 +01:00
MrGadget
303d0f4b3a
Reverted spelling error from #537 ( #584 )
2019-03-11 18:51:34 -05:00
rodolphito
dd362b18a0
Fixed the NetworkAnimator issue I introduced in the bandwidth fix. This should also further improve bandwidth, too. ( #576 )
2019-03-11 08:54:46 +01:00
Paul Pacheco
092c5663b6
NetworkReader should enforce read only ( #580 )
2019-03-10 12:04:45 -05:00
rodolphito
4aa1a4b169
Removed one liner braces from transport files. ( #544 )
2019-03-10 10:18:11 +01:00
vis2k
98a0e23413
Persistent sceneid ( #563 )
...
* add empty line
* persistent scene ids
* never assign scene ids at runtime
* fix warning
* fix 'sceneid is never assigned to' warning in play mode
* simplify bitwise operation
* set dirty even if only scene index byte changed
* improve log message
* assign build index byte in OnPostProcessScene to also work with unopened scenes and build index changes
* add comment
* improve log
* Add sceneid not set check
* Only PostProcess the objects from this scene.
* Interrupt build if there is an unopened scene that still needs sceneId assignments. This makes it 100% fail safe.
* improve comment and error message
* clear build index byte before or-ing into it
2019-03-08 20:24:18 +01:00
vis2k
508ba558fc
NetworkManager: headless start moved to Start() because Awake() is for initialization.
2019-03-07 15:30:23 +01:00
vis2k
3a86bd501a
headless start doesn't unnecessarily set tick rate anymore. StartServer already takes care of that.
2019-03-07 15:27:15 +01:00
vis2k
8b85e1c846
NetworkIdentityEditor: create GUIContent directly
2019-03-07 13:39:30 +01:00
vis2k
f3738d87d7
NetworkAnimatorEditor: create GUIContent directly
2019-03-07 13:39:30 +01:00
rodolphito
ca7824bbc1
Fixed animator bandwidth problem. ( #536 )
...
* Fixed animator bandwidth problem.
* Renamed xShadowCopy to lastXParamters, renamed val to be consistent with the reading value names, renamed newValue to newIntValue to be consistent with newFloatValue and newBoolValue.
* Removed Debug.log which slipped by.
2019-03-06 22:52:26 +01:00
MichalPetryka
9afefbdce7
Adjusted line endings, encoding and trimmed whitespaces at EOL ( #561 )
2019-03-06 18:08:48 +01:00
rodolphito
896551eb00
Finished replacing comment walls with regions. ( #558 )
2019-03-06 10:53:35 -06:00
vis2k
17ab8ae30a
add empty line
2019-03-06 14:42:22 +01:00
rodolphito
ca57f1180c
Removed trailing whitespace ( #556 )
2019-03-06 09:08:34 +01:00
rodolphito
98284e4253
Removed single line braces from NetworkWriter. ( #545 )
...
* Removed single line braces from NetworkWriter.
* Undid alignment.
2019-03-05 18:17:42 -06:00
vis2k
ed64872163
NetworkIdentity.OnValidate: wrap in #if UNITY_EDITOR in case OnValidate is needed at runtime later
2019-03-04 17:43:51 +01:00
vis2k
8eb27ea0af
Syntax
2019-03-04 17:42:24 +01:00
rodolphito
f6d89c763f
Removed comment divider thingies and used regions where applicable. Reordered a bit of code to make the regions make sense. ( #532 )
2019-03-04 10:04:54 +01:00
rodolphito
f324c0df94
Removed SetInstanceId by making netId setter internal. ( #510 )
...
* Removed SetInstanceId by making netId setter internal.
* Split isServer into multiple lines as per vis' suggestion.
2019-03-04 10:02:00 +01:00
rodolphito
15c3991905
Removed braces from everything else. ( #551 )
2019-03-04 09:57:27 +01:00
rodolphito
c1179fbd0d
Renamed UNetInvokeType to MirrorInvokeType. ( #553 )
2019-03-04 09:56:59 +01:00
rodolphito
8141c44e50
Brace crunching ( #554 )
...
* Made bracing consistent in WeaverTests.
* Made bracing consistent everywhere else.
2019-03-04 08:48:28 +01:00
rodolphito
335ed683a5
Remove one liner braces in NetworkManager. ( #547 )
2019-03-04 08:47:11 +01:00
rodolphito
0790dd2ac9
Remove one liner braces on NetworkServer. ( #548 )
2019-03-04 08:46:54 +01:00
rodolphito
b3e6194665
Remove one liner braces. ( #550 )
2019-03-04 08:44:39 +01:00
rodolphito
45e886e2c4
Removed one liner braces in NetworkIdentity. ( #546 )
2019-03-04 08:44:27 +01:00
rodolphito
a9deb56282
Remove one liner braces in ClientScene ( #549 )
2019-03-04 08:43:33 +01:00
Paul Pacheco
70cfe9e8ce
Websocket transport should be namespaced ( #542 )
2019-03-04 08:42:17 +01:00
Paul Pacheco
9a0af7cb55
Allow users to unpack messages too ( #543 )
2019-03-03 18:06:36 -06:00
Paul Pacheco
4749abd307
Move GetId<T> to MessagePacker ( #540 )
...
Now we have the logic of how many bits in just one place and we free up MessageBase for eventually converting to an interface
2019-03-03 14:02:34 -06:00
Paul Pacheco
e4fbbeddc3
Simplify add player extra data ( #537 )
...
* Simplify add player extra data
* Pass byte[] in the client too
* Renamed to extra message
2019-03-03 19:53:24 +01:00
vis2k
001cec6d82
NetworkManager.InitializeSingleton: set active transport AFTER setting singleton or destroying self. not before. Otherwise we would set it to a transport that is destroyed a moment later.
2019-03-03 18:19:07 +01:00
vis2k
440a6dfc6f
NetworkManager.InitializeSingleton: show warning if destroying self. No need to show an error, since this can be completely normal if we use zones/multiple scenes and switch back to the main scene, which still has a networkmanager.
2019-03-03 18:16:29 +01:00
Paul Pacheco
480bd8c9c6
Transport should be protected so that people can implement their own OnValidate logic ( #539 )
2019-03-03 16:51:03 +01:00
Paul Pacheco
c7b8f78aae
#418 Send messages without id ( #422 )
...
* Client can send/receive messages without id
* Server can send and receive messages without id
* Move message id to one common place
* Client use the new send method
* Obsolete the message ids
* Remove player uses the new api
* Refactor AddPlayer with new message api
* Provide a Pack method that gets the message id
* Convert ready message to new api
* Use new api for ObjectDestroy and ObjectHide
* Refactored ready message to new API
* Refactored SpawnSceneObjectMessage to new api
* Convert local authority message to new api
* Convert spawn started message to new api
* Convert spawn finished message to new api
* Convert upate vars message to new api
* Convert owner message to new api
* Convert pong message to new api
* Convert RPC message to new api
* Convert SyncEvent rpc to new api
* Refactor Command to new api
* Refactor Ping to new api
* Convert ErrorMessage to new api
* Convert ErrorMessage to new api
* Use int instead of short for message id to avoid collisions
* Keep only 16 bit hash for message id
* Converted Disconnect Message to new api
* Convert Connect to new message api
* Convert not ready message to new api
* Convert scene message to new api
* the Enum is no longer used for message id
* Add non obsolete version of SendToClient
* Document how to use new API
With this PR, we no longer use Message id, document the proper use of the api
* use C# syntax highlight
* Update NetworkMessages.md (#5 )
Punctuation changes, added `cs` to code blocks.
* Write message id in short instead of packed int
* Use packer method with id
* Pass the NetworkConnection to the client message handlers
2019-03-03 14:52:35 +01:00
rodolphito
834fab5ba4
Changed several mentions of UNet to instead say Mirror. ( #531 )
2019-03-03 10:34:23 +01:00
rodolphito
8b2f99b3c4
Made SetDynamicAssetId a setter on the assetId property. ( #530 )
...
* Made SetDynamicAssetId a setter on the assetId property.
* Update NetworkIdentity.cs
2019-03-03 10:32:49 +01:00
rodolphito
c0ba0073b2
Removed RequireComponent(Animator) because NetworkAnimator does not have to be on the same game object as the Animator. ( #529 )
2019-03-03 10:30:59 +01:00
rodolphito
bc9982e187
Remove useless comment ( #528 )
2019-03-02 23:25:10 -06:00
rodolphito
d9be5cf941
Update tooltip in NetworkTransform. ( #527 )
2019-03-02 23:13:38 -06:00
MrGadget
24b8003b74
Fixed guidance for hostId
...
It should be `typeof(NetworkConnection)`
2019-03-02 22:46:12 -05:00
MrGadget
11a755e961
Restored GetConnectionInfo with [Obsolete] ( #504 )
...
* Restored GetConnectionInfo with [Obsolete]
* Update Transport.cs
* Update Transport.cs
* Update Transport.cs
2019-03-02 21:03:26 +01:00
vis2k
ce723a62ff
Ninja.Websockets license.meta file generated by Unity
2019-03-02 10:27:48 +01:00
vis2k
c4f436d71e
Rebuild Weaver.dll
2019-03-02 09:55:37 +01:00
Zac North
7da51e62ff
Removed an unused override in the Example NetworkLobbyPlayer ( #521 )
2019-03-02 09:53:36 +01:00
vis2k
cfc5a0888f
Rebuild Weaver.dll
2019-03-02 09:46:26 +01:00
c6burns
92596de38a
Weaver follow on pr to 490 ( #519 )
...
* removed workaround from previous cecil version that now causes sharing violation console warning
* fixed language feature error -- null prop op is C#4 but .sln target is net35
* separated editor logging (required) from console logging (optional)
* fix issue introduced by flipping boolean property meaning in 9895bff
* added updated weaver assembly
* updated to release assembly - wrong assembly in ef0c903
* commenting weave target debug log to retain prev behaviour (oops)
2019-03-02 09:45:38 +01:00
vis2k
400382be76
ProximityChecker NonAlloc to avoid GC (see https://github.com/vis2k/Mirror/pull/228/ )
2019-03-01 22:51:49 +01:00
Zac North
d41701e0c5
Added a license for Ninja.WebSockets ( #518 )
2019-03-01 21:29:02 +01:00
vis2k
32b9fcc987
Remove old comment
2019-03-01 15:30:20 +01:00
vis2k
0e5181f26a
NetworkClient: move PrepareForConnect code into Connect
2019-03-01 15:29:55 +01:00
rodolphito
6b6d2b00a5
Spaces around equal signs. ( #515 )
2019-03-01 15:26:20 +01:00
rodolphito
4d40ddb891
Minor style fixes. ( #514 )
2019-03-01 15:01:42 +01:00
rodolphito
5a9f10ec47
Made member accessor debug logs consistent. ( #513 )
2019-03-01 07:29:38 -06:00
rodolphito
1e13ef5c31
Made it more clear that the checkboxes on the NetworkAnimator are referring to whether the parameter should be synced or not. ( #512 )
2019-03-01 11:45:01 +01:00
vis2k
fcc3f06feb
move RegisterSystemHandlers from ClientScene to NetworkClient. There is no reason why it should be in ClientScene, especially since it passes a NetworkClient, which is very strange. Additionally, not all delegates are in ClientScene anyway (like NetworkTime) ( #473 )
2019-03-01 11:38:00 +01:00
rodolphito
e30ec76581
Made client authority setter internal to remove internal setter method. ( #508 )
2019-03-01 01:18:20 -06:00
Paul Pacheco
32c89f4f33
Use property setter instead of custom setter
2019-03-01 01:11:46 -06:00
rodolphito
848e9cfbe9
Removed unused line. ( #506 )
2019-03-01 01:07:08 -06:00
Zac North
fbada30e01
Changed WebSockets default port to 7778 in case we add Multiplex ( #503 )
2019-02-28 22:55:12 +01:00
Zac North
8f041331de
Fix WebSocket transport default port ( #502 )
2019-02-28 22:13:34 +01:00
Zac North
abf95651e2
Added modified version of Paul's 2018 WebSockets transport ( #369 )
...
* Added modified version of Paul's 2018 WebSockets transport, modifications include:
- Basic support for WSS
- Event format converted to master event format (UnityEvents)
* Fixed indentation and added support for Available()
* Manually merged in Paul's changes for latest version of Transport
* Added comment to CertVerificationCallback to reflect new research done in live environment.
* Added NoDelay option and merged in some minor renames from 2018 branch version
2019-02-28 20:53:22 +01:00
MrGadget
c8a12eb12e
Update Readme.txt ( #498 )
...
Removed GitHub link
Added notice to restart unity after import
2019-02-28 18:38:01 +01:00
Lymdun
73f822d9b7
Weaver - My kingdom for some tests ( #490 )
...
* Added custom assembly compiler for easier testing
* Added weaver tests
* Added controls to silence Weaver logging and collect logs
* Update weaver dll
* Added new weaver test fixture and tests
* Connected WeaveFailed property to weave result status
* Removed useless meta files
* Removed useless comment
* Fix artifacts deletion
* Moved to [SetUp]
* Removed logs noise
2019-02-28 17:22:18 +01:00
vis2k
a28355d771
Weaver: remove unused ULocalConnectionToClientType
2019-02-28 15:44:18 +01:00
vis2k
cbeea38298
move Command NetworkClient.active check out of weaver ( #494 )
2019-02-28 15:23:04 +01:00
vis2k
9f0c485b7d
move TargetRpc NetworkServer.active and conn is ULocalConnectionToServer check out of weaver ( #492 ) ( #491 )
2019-02-28 15:21:07 +01:00
vis2k
d7b6c8556f
move TargetRpc NetworkServer.active and conn is ULocalConnectionToServer check out of weaver ( #492 )
2019-02-28 15:18:52 +01:00
vis2k
8d96dd77cd
Fix trailing whitespace
2019-02-28 13:57:46 +01:00
MichalPetryka
5ac23dd231
More using cleanup ( #489 )
2019-02-28 12:36:21 +01:00
MichalPetryka
97fc7aca4c
Use type keywords ( #472 )
...
* Use type keywords
* Update
2019-02-28 12:21:27 +01:00
SuperCables
2b429c9b3a
This doesn't sync slow rotating objects ( #428 )
...
* This doesn't sync slow rotating objects
The function sets lastRotation to the current rotation every frame, regardless of whether or not it detected a change. Because comparing two similar, but different Quaternions return true, only quickly rotating objects will return true; slow turning objects will return false, and the rotation will not be synced. By not updating lastRotation until a difference is spotted, any rotation will be synced.
This fix allowed my slow rotating spaceship to sync rotation.
TL;DR
lastRotation should be the last time this function returned true, not the rotation last frame.
* Update NetworkTransformBase.cs
2019-02-28 12:19:09 +01:00
rodolphito
7ecd66d6ec
Transport.activeTransport instead of NetworkManager.singleton.transport ( #479 )
...
* Created Transport.activeTransport to decrease NetworkManager god status.
* Fixed NetworkManagerHUD. (I forgot I had deleted it temporarily for testing)
2019-02-28 11:58:37 +01:00
MichalPetryka
c33c72e720
Using cleanup ( #452 )
2019-02-28 11:44:55 +01:00
rodolphito
c13f4bd13b
Used Expression Body Members to make code smaller and nicer in NetworkIdentity. ( #486 )
2019-02-28 10:20:57 +01:00
rodolphito
2d37a9e87c
First pass of moving stuff out of UNetwork. ( #481 )
2019-02-28 09:42:03 +01:00
Paul Pacheco
d39f999f0f
Simplify with auto property
2019-02-27 22:12:19 -06:00
rodolphito
51458762d4
Split Utils into FloatBytePacker and NetworkManager. ( #483 )
2019-02-27 21:47:37 -06:00
rodolphito
96133d1583
Removed useless proxy methods and substituted in direct property modification. ( #454 )
2019-02-27 18:33:10 -06:00
rodolphito
82535b0a8c
Moved SceneAttribute into CustomAttribute. ( #470 )
2019-02-27 18:32:13 -06:00
MichalPetryka
f746ba8b08
Hide obsolete warnings ( #476 )
2019-02-27 17:06:13 +01:00
MrGadget
e7e890988d
Re-applied GetActiveScene ( #474 )
2019-02-27 15:57:33 +01:00
vis2k
732111c1b9
add obsolete hostId again for easier transition from UNET
2019-02-27 15:43:35 +01:00
vis2k
26a9b5670d
NetworkClient.allClients added as obsolete
2019-02-27 15:24:44 +01:00
rodolphito
dbd5f57e96
Remove List.ForEach on hot path. ( #467 )
...
* Remove LINQ on hot path.
* Fixed erroneous classification of List.ForEach as LINQ.
* Added back using so that it could be removed by #452 .
2019-02-27 15:11:52 +01:00
rodolphito
d9a64c62b7
Move NetworkProximityChecker to ../Components/. ( #471 )
2019-02-27 14:39:44 +01:00
MichalPetryka
a3a10e82f2
Use string interpolation expressions ( #469 )
2019-02-27 14:37:54 +01:00
vis2k
6630b0bdbf
Move NetworkIdentity.UNetStaticUpdate to NetworkManager.Update. There is no reason why it should be in NetworkIdentity. ( #457 )
2019-02-27 14:36:53 +01:00
vis2k
b1c028a067
Rename Protocol to MessagePacker( #444 )
2019-02-27 14:36:09 +01:00
vis2k
07a5cca725
NetworkConnection.isConnected obsolete
2019-02-27 14:32:15 +01:00
MichalPetryka
ffda610f0d
Use nameof expression ( #468 )
2019-02-27 14:27:52 +01:00
rodolphito
0114a36fe1
Expanded symbols in test comments to english. ( #465 )
2019-02-27 09:42:50 +01:00
vis2k
81d031c6a1
Rebuild weaver.dll
2019-02-27 09:39:53 +01:00
Lymdun
cb432a12fb
Weaver aesthetic ( #455 )
...
* Renamed lists to WeaveList
* Renamed scriptDef to CurrentAssembly
* Renamed corLib to CorLibModule
* Renamed m_UnityAssemblyDefinition to UnityAssembly
* Renamed m_UNetAssemblyDefinition to NetAssembly
* Renamed MaxRecursionCount to m_kMaxRecursionCount
* Renamed s_RecursionCount to m_recursionCount
* Renamed m_DebugFlag to m_debugLogEnabled
* Moved properties & fixed comment
* Renamed fail to WeavingFailed
* Renamed generateLogErros to GenerateLogErrors
* Removed UNET references
* Updated dll
* WeaveLists better than WeaveList
* Removed m_ prefix
* Updated dll
2019-02-27 09:38:17 +01:00
rodolphito
7d3d8dad72
Simplify ClientScene functions. ( #461 )
2019-02-26 22:16:42 -06:00
rodolphito
72474af073
Fixed typos in Lobby Example README. ( #456 )
2019-02-26 22:16:03 -06:00
rodolphito
ca9d88d602
Greatly simplified SyncList by using Expression Bodied Members. ( #466 )
2019-02-26 22:15:22 -06:00
vis2k
a851ca7554
Rename NetworkWriter.Reset to SetLength(value). Seems more obvious. Reset could mean a lot of things. ( #459 )
2019-02-26 20:59:32 +01:00
vis2k
619d5f47e3
Remove hostId from NetworkServer and NetworkConnection because it was only needed for the old LLAPI. Also added comment for NetworkConnection.isConnected which can be removed later.
2019-02-26 17:08:10 +01:00
vis2k
74b297819b
NetworkServer: remove unnecessary check because hostId is set to 0 one line before that
2019-02-26 16:57:19 +01:00
vis2k
d08b9c0272
NetworkClient.clientId removed because all it ever did was change between -1 and 0 to indicate if a connection was made. The .active variable is enough here.
2019-02-26 16:45:58 +01:00
vis2k
3d945666a8
NetworkClient.Connect: use 0 as second parameter because the third one was actually the client id. The second one was the host id, which will likely be removed soon because it's left over from LLAPI.
2019-02-26 16:43:55 +01:00
vis2k
9a143dac5b
NetworkClient.Disconnect sets active = false too
2019-02-26 16:41:18 +01:00
vis2k
bd2952446e
NetworkClient.clientId: add comment
2019-02-26 16:36:08 +01:00
vis2k
70ecdd8f3a
NetworkClient.UpdateClients renamed to UpdateClient
2019-02-26 16:28:45 +01:00
vis2k
db32754100
NetworkClient: move Shutdown next to ShutdownAll
2019-02-26 16:26:33 +01:00
vis2k
9957cbc3b5
NetworkServer.OnConnected: call AddConnection in here too, instead of manually doing it from AddLocalClient and OnConnected
2019-02-26 16:07:40 +01:00
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