Skip to content

Commit 4cdc76f

Browse files
committed
fix: revert readonly initializer removal
1 parent ddbfd6d commit 4cdc76f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

com.unity.netcode.gameobjects/Runtime/SceneManagement/SceneEventData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ internal class SceneEventData : IDisposable
130130
/// was synchronizing (if so server will send another message back to the client informing the client of NetworkObjects to remove)
131131
/// spawned during an initial synchronization.
132132
/// </summary>
133-
private readonly List<NetworkObject> m_NetworkObjectsSync;
133+
private readonly List<NetworkObject> m_NetworkObjectsSync = new List<NetworkObject>();
134134

135-
private readonly List<NetworkObject> m_DespawnedInSceneObjectsSync;
135+
private readonly List<NetworkObject> m_DespawnedInSceneObjectsSync = new List<NetworkObject>();
136136

137137
/// <summary>
138138
/// Server Side Re-Synchronization:
139139
/// If there happens to be NetworkObjects in the final Event_Sync_Complete message that are no longer spawned,
140140
/// the server will compile a list and send back an Event_ReSync message to the client.
141141
/// </summary>
142-
private readonly List<ulong> m_NetworkObjectsToBeRemoved;
142+
private readonly List<ulong> m_NetworkObjectsToBeRemoved = new List<ulong>();
143143

144144
private bool m_HasInternalBuffer;
145145
private FastBufferReader m_InternalBuffer;

0 commit comments

Comments
 (0)