Commit Graph

1423 Commits

Author SHA1 Message Date
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
Paul Pacheco
ac97a3aac1 More technical rationale (#524)
* More technical rationale

Less opinion,  more technical focused analysis on the issue.

* grammar fixes

* Improved grammar

* Fix year

* Fixed typo

* wording improvement

* no need parenthesis
2019-03-02 20:57:18 +01:00
MrGadget
953cd8f762 Update ChangeLog.md (#525)
Added entry
2019-03-02 20:56:08 +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
c6burns
a44fc29475 added tasks to delete weaver symbols after debug builds (#523) 2019-03-02 09:55:02 +01:00
Zac North
7da51e62ff Removed an unused override in the Example NetworkLobbyPlayer (#521) 2019-03-02 09:53:36 +01:00
vis2k
6b8021a5e0 Weaver: set UnityLogEnabled to true by default 2019-03-02 09:52:45 +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
MrGadget
f0949f299e Update ChangeLog.md (#505)
Added another entry
2019-03-01 01:20:26 -06: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
MrGadget
2bc401897b Update ChangeLog.md (#501)
* Update ChangeLog.md

Added entry for web sockets

* Update ChangeLog.md

* Update ChangeLog.md

* Update ChangeLog.md

Added entry for Multiplex

* Update ChangeLog.md

Rearranged the order, formatting
2019-02-28 22:17:39 +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
16909ce2e7 Update ChangeLog.md (#499)
Added entries for version 1.5
2019-02-28 20:10:20 +01:00
MrGadget
303e9fe1e0 Update ChangeLog.md (#500)
Added entries for version 1.4
2019-02-28 19:49:04 +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
MrGadget
3bb505c076 Docs (#497)
* Showcase and ChangeLog docs

* Fixed image file extension
2019-02-28 17:29:06 +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