Commit Graph

7028 Commits

Author SHA1 Message Date
vis2k
7672afea48 Unity 2021.3.11 2022-10-21 13:24:42 +02:00
vis2k
c07c0797ec TimeSnapshot moved into it's own file 2022-10-21 12:42:59 +02:00
mischa
5b5854440a
Update README.md 2022-10-21 12:33:13 +02:00
mischa
e76962c226
Update README.md 2022-10-21 12:32:29 +02:00
mischa
e0a91eeb3a
feature: SyncDirection (V2) to easily support client auth components without extra Rpcs/Cmds. previously OnSerialize was only server-to-client direction. (#3244)
* feature: SyncDirection to easily support client auth components without extra Rpcs/Cmds. previously OnSerialize was only server-to-client direction. (#3232)

* fix and test

* add test

* remove todo

* comments

* only serialize once

* simplify dirty checks

* syntax

* remove doulbe comments
2022-10-19 23:54:54 +02:00
vis2k
a1fbc55e8a Tests: syntax for easier debugging 2022-10-19 19:51:30 +02:00
vis2k
6f4c7cb805 feature: NetworkWriter.WriteBytes(byte*) unsafe version to prepare for BitTree delta compression 2022-10-19 19:39:08 +02:00
vis2k
76313cd30c Mirror.Components.asmdef: allow unsafe to prepare for NetworkTransform V3 2022-10-19 19:39:01 +02:00
vis2k
25a45a9ce8 Revert "Utils.RoundBitsToFullBytes from DOTSNET / Mirror II to prepare for manual per-field Delta Compression for NetworkTransform V3"
This reverts commit c7e3dc32d6.
2022-10-18 09:39:49 +02:00
vis2k
9c2444475c Tests: allow unsafe 2022-10-17 19:18:01 +02:00
vis2k
c7e3dc32d6 Utils.RoundBitsToFullBytes from DOTSNET / Mirror II to prepare for manual per-field Delta Compression for NetworkTransform V3 2022-10-17 18:41:14 +02:00
vis2k
d9aa7b152e Compression.ScaleToLong/Float to prepare for next NetworkTransform float<->long compression 2022-10-17 10:04:31 +02:00
vis2k
9d487b3a86 comment 2022-10-15 22:30:24 +02:00
vis2k
743e00bd20 SendTargetRpc: improve error messages 2022-10-15 20:42:43 +02:00
vis2k
ed0b7339eb assetId is now printed as decimal instead of hex, for consistency with Unity Inspector which also shows it as decimal. 2022-10-14 11:18:33 +02:00
vis2k
270be5f452 fix: #3234 assetId setter now allows overwriting an old assetId after duplicating a prefab.
the previous assetId Guid to int commit (4430001521) changed AssignAssetId() from modifying m_assetId to assetId.set directly, which introduced this bug.
2022-10-14 11:13:42 +02:00
vis2k
8006251382 NetworkIdentity.assetId.set: update explanation, copied the wrong one from Mirror II 2022-10-14 11:00:54 +02:00
vis2k
149d907823 syntax 2022-10-13 17:38:39 +02:00
vis2k
bf55c68d96 unnecessary 2022-10-13 17:27:41 +02:00
vis2k
9120de1016 comment 2022-10-13 13:46:52 +02:00
vis2k
e647df8fa3 feature: NetworkConnection.owned objects are now available on server AND on client 2022-10-13 13:29:06 +02:00
vis2k
6bb42e9e81 breaking: NetworkConnectionToServer.clientOwnedObjects renamed to .owned (simplify API) 2022-10-13 11:03:42 +02:00
vis2k
8cb64383fc add deprecated dates 2022-10-13 11:01:19 +02:00
mischa
a20bad57e5
breaking: .hasAuthority renamed to .isOwned because it's easier to understand, and to prepare for SyncDirection where there is a difference between: (#3231)
isOwned = is this one of the client connection's .owned entities?
authority = can we modify this component's state? depends on SyncDirection AND owned
2022-10-13 10:59:39 +02:00
vis2k
90028b43ea NetworkServer.sendInterval calculated separately so it's easier to change sendRate later 2022-10-13 10:49:07 +02:00
vis2k
1433bb7993 comment 2022-10-12 21:22:16 +02:00
vis2k
2bab435832 perf: NetworkIdentity.Serialize: only iterate if any dirty bit set, otherwise don't need to iterate again 2022-10-12 21:17:10 +02:00
vis2k
4127345f8a fix: Benchmark demo Spatial Hashing radius reduced from 200 to 30 so the monsters actually despawn when walking out of range in the demo 2022-10-12 21:14:55 +02:00
vis2k
e6886e8a84 fix: ensure Serialize writes nothing at all if not dirty and add test so it's never missed again(!).
fixes unchanged objects sending an unnecessary 1 byte dirty mask after recent dirtybits improvement.
2022-10-12 21:06:03 +02:00
vis2k
8ec99fa153 NetworkIdentity: ValidateComponents for use from initialize, serialize, deserialize all together 2022-10-12 12:33:25 +02:00
vis2k
227940e054 comment 2022-10-12 11:13:58 +02:00
vis2k
9dd04e2efa fix: NetworkIdentity.MaxNetworkBehaviours and EnsureMax function so we have the same code in both places, where previously Serialize() still checked for 255 instead of 64 2022-10-12 11:08:12 +02:00
vis2k
d3e32ddbdf readme 2022-10-11 21:03:31 +02:00
vis2k
91313c2ded readme 2022-10-11 13:27:52 +02:00
vis2k
4896b97543 readme: credits 2022-10-11 13:27:50 +02:00
vis2k
d360f0fdbb readme: :) 2022-10-11 12:38:23 +02:00
vis2k
579fd68d56 readme update 2022-10-11 12:38:13 +02:00
mischa
c179d233a1
fix: Unity 2019, 2020 support added again (#3230)
* fix: Examples/AdditiveLevels/Prefabs/Portal doesn't depend on TextMeshPro anymore (for 2019 compatibility)

* packages: removed unnecessary TextMeshPro (causes errors in Unity 2019)

* fix: NetworkReader byte[] constructor added again for 2019 support

* fix: NetworkReader byte[] SetBuffer added again for 2019 support

* fix: NetworkClient OnTimeSnapshotMessage: NetworkTime.localTime for 2019 support

* fix: NetworkServer NetworkLateUpdate: NetworkTime.localTime for 2019 support

* fix: Read/WriteGuid support for 2019

* fix: NetworkTransformBase: NetworkTime.localTime for 2019 support

* fix: Grid2D new hashSet constructor without capacity for 2019 support

* 2019

* this
2022-10-10 23:32:13 +08:00
vis2k
e7110d3015 TODO 2022-10-10 14:52:19 +02:00
vis2k
5efcd8f113 inlining 2022-10-10 10:56:16 +02:00
vis2k
2310c248c1 NetworkBehaviour.IsDirty: shorter 2022-10-10 10:56:05 +02:00
vis2k
76ea4369ba NetworkClient: common Initialize() method for all connect functions 2022-10-10 10:37:37 +02:00
vis2k
fe6147dd4d fix: NetworkClient ConnectHost now initializes time interpolation as well 2022-10-10 10:34:08 +02:00
mischa
88e4260252
perf: NetworkBehaviour.Serialize safety check reduced from 4 bytes length header to 1 byte length hash, while keeping error correction (#3229)
* wip

* self correction

* separate function

* test
2022-10-10 15:51:15 +08:00
mischa
b5ac61c7b2
perf: NetworkIdentity.Serialize bandwidth reduced from 1 byte per component index to (roughly) 1 bit per component (#3228)
* serialize with varint masks

* deserialize

* test

* fixfix

* redundant

* unused

* comment

* faster

* old

* comment

* comment
2022-10-10 15:50:28 +08:00
vis2k
01cd1041f6 update comment 2022-10-09 22:34:57 +02:00
vis2k
2a3e681e03 comment 2022-10-09 16:47:12 +02:00
vis2k
58a89a5d24 Tests: split VarInt and VarUInt tests 2022-10-09 15:25:52 +02:00
vis2k
16d5a7e6ed naming 2022-10-09 15:12:01 +02:00
vis2k
822ecdaaba syntax 2022-10-09 15:11:23 +02:00