Commit Graph

1092 Commits

Author SHA1 Message Date
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