Skip to content

Commit 09651ea

Browse files
author
Unity Technologies
committed
com.unity.netcode@0.0.4-preview.0
## [0.0.4-preview.0] - 2019-12-12 ### New features ### Changes * Changed the codegen for NativeString64 to use the serialization in DataStream. ### Fixes ### Upgrade guide
1 parent 9392042 commit 09651ea

File tree

4 files changed

+14
-54
lines changed

4 files changed

+14
-54
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change log
22

3+
## [0.0.4-preview.0] - 2019-12-12
4+
### New features
5+
### Changes
6+
* Changed the codegen for NativeString64 to use the serialization in DataStream.
7+
8+
### Fixes
9+
### Upgrade guide
10+
311
## [0.0.3-preview.2] - 2019-12-05
412
### New features
513
### Changes

Documentation~/client-server-worlds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To override this default behavior, use the [UpdateInWorld](https://docs.unity3d
1818

1919
As well as the attributes listed above, you can use the __PlayMode Tools__ window in the Unity Editor to select what happens when you enter Play Mode. To access __PlayMode Tools__, go to menu: __Multiplayer > PlayMode Tools__.
2020

21-
![PlayMode Tools](/images/playmode-tools.png)<br/>_PlayMode Tools_
21+
![PlayMode Tools](images/playmode-tools.png)<br/>_PlayMode Tools_
2222

2323
|**Property**|**Description**|
2424
|:---|:---|

Editor/CodeGenTemplates/SnapshotValue/GhostSnapshotValueNativeString64.cs

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,7 @@ public void Serialize(int networkId, ref GhostSnapshotData baseline, DataStreamW
4040
#endregion
4141
#region __GHOST_WRITE__
4242
if ((changeMask__GHOST_MASK_BATCH__ & (1 << __GHOST_MASK_INDEX__)) != 0)
43-
{
44-
writer.WritePackedUIntDelta(__GHOST_FIELD_NAME__.LengthInBytes, baseline.__GHOST_FIELD_NAME__.LengthInBytes, compressionModel);
45-
var __GHOST_FIELD_NAME__BaselineLength = (ushort)math.min((uint)__GHOST_FIELD_NAME__.LengthInBytes, baseline.__GHOST_FIELD_NAME__.LengthInBytes);
46-
for (int sb = 0; sb < __GHOST_FIELD_NAME__BaselineLength; ++sb)
47-
{
48-
unsafe
49-
{
50-
fixed (byte* b1 = &__GHOST_FIELD_NAME__.buffer.byte0000)
51-
fixed (byte* b2 = &baseline.__GHOST_FIELD_NAME__.buffer.byte0000)
52-
{
53-
writer.WritePackedUIntDelta(b1[sb], b2[sb], compressionModel);
54-
}
55-
}
56-
}
57-
for (int sb = __GHOST_FIELD_NAME__BaselineLength; sb < __GHOST_FIELD_NAME__.LengthInBytes; ++sb)
58-
{
59-
unsafe
60-
{
61-
fixed (byte* b = &__GHOST_FIELD_NAME__.buffer.byte0000)
62-
{
63-
writer.WritePackedUIntDelta(b[sb], 0, compressionModel);
64-
}
65-
}
66-
}
67-
}
43+
writer.WritePackedStringDelta(__GHOST_FIELD_NAME__, baseline.__GHOST_FIELD_NAME__, compressionModel);
6844
#endregion
6945
}
7046

@@ -73,31 +49,7 @@ public void Deserialize(uint tick, ref GhostSnapshotData baseline, DataStreamRea
7349
{
7450
#region __GHOST_READ__
7551
if ((changeMask__GHOST_MASK_BATCH__ & (1 << __GHOST_MASK_INDEX__)) != 0)
76-
{
77-
__GHOST_FIELD_NAME__.LengthInBytes = (ushort)reader.ReadPackedUIntDelta(ref ctx, (uint)baseline.__GHOST_FIELD_NAME__.LengthInBytes, compressionModel);
78-
var __GHOST_FIELD_NAME__BaselineLength = (ushort)math.min((uint)__GHOST_FIELD_NAME__.LengthInBytes, baseline.__GHOST_FIELD_NAME__.LengthInBytes);
79-
for (int sb = 0; sb < __GHOST_FIELD_NAME__BaselineLength; ++sb)
80-
{
81-
unsafe
82-
{
83-
fixed (byte* b1 = &__GHOST_FIELD_NAME__.buffer.byte0000)
84-
fixed (byte* b2 = &baseline.__GHOST_FIELD_NAME__.buffer.byte0000)
85-
{
86-
b1[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, b2[sb], compressionModel);
87-
}
88-
}
89-
}
90-
for (int sb = __GHOST_FIELD_NAME__BaselineLength; sb < __GHOST_FIELD_NAME__.LengthInBytes; ++sb)
91-
{
92-
unsafe
93-
{
94-
fixed (byte* b = &__GHOST_FIELD_NAME__.buffer.byte0000)
95-
{
96-
b[sb] = (byte)reader.ReadPackedUIntDelta(ref ctx, 0, compressionModel);
97-
}
98-
}
99-
}
100-
}
52+
__GHOST_FIELD_NAME__ = reader.ReadPackedStringDelta(ref ctx, baseline.__GHOST_FIELD_NAME__, compressionModel);
10153
else
10254
__GHOST_FIELD_NAME__ = baseline.__GHOST_FIELD_NAME__;
10355
#endregion

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "com.unity.netcode",
33
"displayName": "Unity NetCode",
4-
"version": "0.0.3-preview.2",
4+
"version": "0.0.4-preview.0",
55
"unity": "2019.3",
66
"unityRelease": "0b11",
77
"description": "Unity multiplayer netcode layer - a high level netcode system built on entities",
88
"dependencies": {
9-
"com.unity.transport": "0.2.2-preview.2",
9+
"com.unity.transport": "0.2.3-preview.0",
1010
"com.unity.entities": "0.3.0-preview.4"
1111
},
1212
"repository": {
1313
"type": "git",
1414
"url": "git@github.com:Unity-Technologies/netcode.git",
15-
"revision": "a66f6695feb879621aa4a464939ffb6d92d3be4e"
15+
"revision": "2c437c67f30b8dd7b9a6848a979abded4b5ffd3b"
1616
}
1717
}

0 commit comments

Comments
 (0)