Skip to content

Commit 560bf37

Browse files
style
adding some additional comments.
1 parent 78e36cb commit 560bf37

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Configuration/NetworkPrefabs.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ public bool Contains(NetworkPrefab prefab)
331331
}
332332

333333
#if UNIFIED_NETCODE
334+
/// <summary>
335+
/// TODO: Either keep or remove prior to freeze.
336+
/// Leaving this here in case we have to control when things get registered.
337+
/// </summary>
334338
internal bool HasPendingGhostPrefabs { get; private set; }
335339
internal bool HasGhostPrefabs { get; private set; }
336340
private List<NetworkPrefab> m_PendingGhostRegistration = new List<NetworkPrefab>();

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,14 @@ internal void Initialize(bool server)
12391239
RealTimeProvider = ComponentFactory.Create<IRealTimeProvider>(this);
12401240

12411241
#if UNIFIED_NETCODE && OUT_OF_BAND_RPC
1242+
// TODO-FixMe:
1243+
// We assign transport at this point to preceed the NetworkConnectionManager
1244+
// being initialized. However, HasGhostPrefabs might not be set at this point
1245+
// if the prefabs list was set after instantiating the NetworkManager.
1246+
// Integration tests do this, but user code could do this too.
1247+
// To-Investigate:
1248+
// Determine if this really impacts anything having prefabs initialze/register
1249+
// at this point versus last.
12421250
NetworkConfig.InitializePrefabs();
12431251
if (NetworkConfig.Prefabs.HasGhostPrefabs)
12441252
{

0 commit comments

Comments
 (0)