Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).

## [1.0.1] -
Comment thread
jeffreyrainy marked this conversation as resolved.
Outdated
Comment thread
jeffreyrainy marked this conversation as resolved.
Outdated

### Changed

### Fixed

- "NetworkLists not populating on client". NetworkList now uses the most recent list as opposed to the list at the end of previous frame, when sending full updates to dynamically spawned NetworkObject. The difference in behaviour is required as scene management spawns those objects at a different time in the frame, relative to updates. (#2062)
Comment thread
jeffreyrainy marked this conversation as resolved.
Outdated

## [1.0.0] - 2022-06-27

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,26 @@ public override void WriteDelta(FastBufferWriter writer)
/// <inheritdoc />
public override void WriteField(FastBufferWriter writer)
{
writer.WriteValueSafe((ushort)m_ListAtLastReset.Length);
for (int i = 0; i < m_ListAtLastReset.Length; i++)
// The listAtLastReset mechanism was put in place to deal with duplicate adds
// upon initial spawn. However, it causes issues with in-scene placed objects
// due to difference in spawn order. In order to address this, we pick the right
// list based on the type of object.
bool isSceneObject = m_NetworkBehaviour.NetworkObject.IsSceneObject != false;
if (isSceneObject)
{
NetworkVariableSerialization<T>.Write(writer, ref m_ListAtLastReset.ElementAt(i));
writer.WriteValueSafe((ushort)m_ListAtLastReset.Length);
for (int i = 0; i < m_ListAtLastReset.Length; i++)
{
NetworkVariableSerialization<T>.Write(writer, ref m_ListAtLastReset.ElementAt(i));
}
}
else
{
writer.WriteValueSafe((ushort)m_List.Length);
for (int i = 0; i < m_List.Length; i++)
{
NetworkVariableSerialization<T>.Write(writer, ref m_List.ElementAt(i));
}
}
}

Expand Down