Skip to content

Commit f43da8a

Browse files
test
Modifying the original test for this to assure it checks for the correct error message.
1 parent b430664 commit f43da8a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/NetworkBehaviourGenericTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ public IEnumerator ValidatedDisableddNetworkBehaviourWarning()
6767
// Set the child object to be inactive in the hierarchy
6868
childObject.SetActive(false);
6969

70-
LogAssert.Expect(LogType.Warning, $"{childObject.name} is disabled! Netcode for GameObjects does not support spawning disabled NetworkBehaviours! The {childBehaviour.GetType().Name} component was skipped during spawn!");
70+
var expectedWarning = parentNetworkObject.GenerateDisabledNetworkBehaviourWarning(childBehaviour);
71+
72+
LogAssert.Expect(LogType.Warning, $"{expectedWarning}");
7173

7274
parentNetworkObject.Spawn();
7375
yield return s_DefaultWaitForTick;

0 commit comments

Comments
 (0)