Skip to content

Commit 8e8c476

Browse files
committed
make TestUInt visible outside
1 parent 9ed10e7 commit 8e8c476

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class NetworkVariableTests : BaseMultiInstanceTest
8888
private const string k_FixedStringTestValue = "abcdefghijklmnopqrstuvwxyz";
8989
protected override int NbClients => 2;
9090

91-
private const uint k_TestUInt = 0x12345678;
91+
public const uint TestUInt = 0x12345678;
9292

9393
private const int k_TestVal1 = 111;
9494
private const int k_TestVal2 = 222;
@@ -391,7 +391,7 @@ bool VerifyStructure()
391391
m_Player1OnClient1.TheStruct.Value.SomeInt == m_Player1OnServer.TheStruct.Value.SomeInt;
392392
}
393393

394-
m_Player1OnServer.TheStruct.Value = new TestStruct() { SomeInt = k_TestUInt, SomeBool = false };
394+
m_Player1OnServer.TheStruct.Value = new TestStruct() { SomeInt = TestUInt, SomeBool = false };
395395
m_Player1OnServer.TheStruct.SetDirty(true);
396396

397397
// Wait for the client-side to notify it is finished initializing and spawning.
@@ -404,7 +404,7 @@ public IEnumerator TestINetworkSerializableCallsNetworkSerialize([Values(true, f
404404
yield return InitializeServerAndClients(useHost);
405405
TestStruct.NetworkSerializeCalledOnWrite = false;
406406
TestStruct.NetworkSerializeCalledOnRead = false;
407-
m_Player1OnServer.TheStruct.Value = new TestStruct() { SomeInt = k_TestUInt, SomeBool = false };
407+
m_Player1OnServer.TheStruct.Value = new TestStruct() { SomeInt = TestUInt, SomeBool = false };
408408

409409
bool VerifyCallback()
410410
{
@@ -630,16 +630,14 @@ public NetworkListTestPredicate(NetworkVariableTest player1OnServer, NetworkVari
630630
}
631631

632632
[UnityTest]
633-
public IEnumerator TestListOfINetworkSerializableCallsNetworkSerialize([Values(true, false)] bool useHost)
633+
public IEnumerator TestListOfINetworkSerializableCallsNetworkSerialize()
634634
{
635-
m_TestWithHost = useHost;
636635
yield return MultiInstanceHelpers.RunAndWaitForCondition(
637636
() =>
638637
{
639638
TestStruct.NetworkSerializeCalledOnWrite = false;
640639
TestStruct.NetworkSerializeCalledOnRead = false;
641-
m_Player1OnServer.TheListOfStructs.Add(
642-
new TestStruct() { SomeInt = k_TestUInt, SomeBool = false });
640+
m_Player1OnServer.TheListOfStructs.Add(new TestStruct() { SomeInt = NetworkVariableTests.TestUInt, SomeBool = false });
643641
m_Player1OnServer.TheListOfStructs.SetDirty(true);
644642
},
645643
() =>

0 commit comments

Comments
 (0)