Skip to content

Commit c484ce7

Browse files
update
Committing suggested changes. Co-authored-by: Emma <emma.mcmillan@unity3d.com>
1 parent 091b502 commit c484ce7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,14 +1899,14 @@ private void SpawnInternal(bool destroyWithScene, ulong ownerClientId, bool play
18991899
#pragma warning restore CS0618 // Type or member is obsolete
19001900

19011901
// If the initial state of the GameObject was disabled and InScenePlaced is marked,
1902-
// then spawn it as in-scene placed.[MTT-15388]
1902+
// then spawn it as in-scene placed.
19031903
// Otherwise:
19041904
// If we are marked as in-scene place, have never been spawned, and the root GameObject
19051905
// was not disabled upon being instantiated, then treat this as a dynamically spawned
19061906
// instance.
19071907
if (InScenePlaced && !m_GameObjectWasDisabledWhenInstantiated && !HasBeenSpawned)
19081908
{
1909-
if (NetworkManagerOwner.NetworkConfig.EnableSceneManagement && NetworkManagerOwner.LogLevel <= LogLevel.Developer)
1909+
if (NetworkManagerOwner.NetworkConfig.EnableSceneManagement && NetworkManagerOwner.LogLevel <= LogLevel.Normal)
19101910
{
19111911
Debug.LogWarning($"[{name}][SceneOrigin={SceneOriginHandle}] Dynamically spawning InScenePlaced network object. This can cause issues!", this);
19121912
}

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,9 +1617,9 @@ internal void ServerSpawnSceneObjectsOnStartSweep()
16171617
// If this isn't the original prefab asset being skipped over (integration test would be a good example), then log the error.
16181618
if (!NetworkManager.NetworkConfig.Prefabs.IsActualPrefabAsset(networkObject))
16191619
{
1620-
NetworkManager.Log.Error(new Context(LogLevel.Error, $"{networkObject.name} appears to be a pre-instantiated {nameof(GameObject)} " +
1621-
$"with a {nameof(NetworkObject)} component instance that is not a registered prefab nor is it an in-scene placed {nameof(NetworkObject)}." +
1622-
$" Dynamically creating unregistered {nameof(NetworkObject)}s is not supported! {networkObject.name} will not be spawned."));
1620+
NetworkManager.Log.Error(new Context(LogLevel.Error, $"Detected a pre-instantiated {nameof(GameObject)} " +
1621+
$"with a {nameof(NetworkObject)} component instance that is not a registered prefab nor an in-scene placed {nameof(NetworkObject)}." +
1622+
$" Dynamically creating unregistered {nameof(NetworkObject)}s is not supported! This {nameof(NetworkObject)} will not be spawned.").AddNetworkObject(networkObject));
16231623
}
16241624
continue;
16251625
}

0 commit comments

Comments
 (0)