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