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