Skip to content

Commit 589e6b1

Browse files
Merge branch 'develop-2.0.0' into fix/networktransform-fails-to-sync-multiple-state-updates
2 parents b409ee3 + 162f3b8 commit 589e6b1

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed

Tools/CI/NGO.Cookbook.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="RecipeEngine" Version="7.0.0" />
12-
<PackageReference Include="RecipeEngine.Api" Version="10.1.0" />
12+
<PackageReference Include="RecipeEngine.Api" Version="10.3.0" />
1313
<PackageReference Include="RecipeEngine.Api.Extensions" Version="7.1.0" />
1414
<PackageReference Include="RecipeEngine.Modules.Api" Version="5.1.0" />
1515
<PackageReference Include="RecipeEngine.Modules.Wrench" Version="1.0.1" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2901,7 +2901,7 @@ public void WhenSerializingAndDeserializingVeryLargeListNetworkVariables_ValuesA
29012901
public void WhenSerializingAndDeserializingVeryLargeHashSetNetworkVariables_ValuesAreSerializedCorrectly(
29022902

29032903
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
2904-
typeof(long), typeof(ulong), typeof(bool), typeof(char), typeof(float), typeof(double),
2904+
typeof(long), typeof(ulong), typeof(char), typeof(float), typeof(double),
29052905
typeof(Vector2), typeof(Vector3), typeof(Vector2Int), typeof(Vector3Int), typeof(Vector4),
29062906
typeof(Quaternion), typeof(Pose), typeof(HashableNetworkVariableTestClass), typeof(FixedString32Bytes))]
29072907
Type testType)

com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariable/NetworkVariableTestsHelperTypes.cs

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,13 @@ internal struct HashableNetworkVariableTestStruct : INetworkSerializeByMemcpy, I
187187
public uint E;
188188
public long F;
189189
public ulong G;
190-
public bool H;
191-
public char I;
192-
public float J;
193-
public double K;
190+
public char H;
191+
public float I;
192+
public double J;
194193

195194
public bool Equals(HashableNetworkVariableTestStruct other)
196195
{
197-
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I == other.I && J.Equals(other.J) && K.Equals(other.K);
196+
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I.Equals(other.I) && J.Equals(other.J);
198197
}
199198

200199
public override bool Equals(object obj)
@@ -215,7 +214,6 @@ public override int GetHashCode()
215214
hashCode.Add(H);
216215
hashCode.Add(I);
217216
hashCode.Add(J);
218-
hashCode.Add(K);
219217
return hashCode.ToHashCode();
220218
}
221219
}
@@ -229,14 +227,18 @@ internal struct HashMapKeyStruct : INetworkSerializeByMemcpy, IEquatable<HashMap
229227
public uint E;
230228
public long F;
231229
public ulong G;
232-
public bool H;
233-
public char I;
234-
public float J;
235-
public double K;
230+
public char H;
231+
public float I;
232+
public double J;
236233

237234
public bool Equals(HashMapKeyStruct other)
238235
{
239-
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I == other.I && J.Equals(other.J) && K.Equals(other.K);
236+
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I.Equals(other.I) && J.Equals(other.J);
237+
}
238+
239+
public override string ToString()
240+
{
241+
return $"{{A: {A}, B: {B}, C:{C}, D:{D}, E:{E}, F:{F}, G:{G}, H:{H}, I:{I}, J:{J}}}";
240242
}
241243

242244
public override bool Equals(object obj)
@@ -257,7 +259,6 @@ public override int GetHashCode()
257259
hashCode.Add(H);
258260
hashCode.Add(I);
259261
hashCode.Add(J);
260-
hashCode.Add(K);
261262
return hashCode.ToHashCode();
262263
}
263264
}
@@ -271,14 +272,18 @@ internal struct HashMapValStruct : INetworkSerializeByMemcpy, IEquatable<HashMap
271272
public uint E;
272273
public long F;
273274
public ulong G;
274-
public bool H;
275-
public char I;
276-
public float J;
277-
public double K;
275+
public char H;
276+
public float I;
277+
public double J;
278278

279279
public bool Equals(HashMapValStruct other)
280280
{
281-
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I == other.I && J.Equals(other.J) && K.Equals(other.K);
281+
return A == other.A && B == other.B && C == other.C && D == other.D && E == other.E && F == other.F && G == other.G && H == other.H && I.Equals(other.I) && J.Equals(other.J);
282+
}
283+
284+
public override string ToString()
285+
{
286+
return $"{{A: {A}, B: {B}, C:{C}, D:{D}, E:{E}, F:{F}, G:{G}, H:{H}, I:{I}, J:{J}}}";
282287
}
283288

284289
public override bool Equals(object obj)
@@ -299,7 +304,6 @@ public override int GetHashCode()
299304
hashCode.Add(H);
300305
hashCode.Add(I);
301306
hashCode.Add(J);
302-
hashCode.Add(K);
303307
return hashCode.ToHashCode();
304308
}
305309
}
@@ -381,6 +385,11 @@ public override bool Equals(object obj)
381385
return obj is HashMapKeyClass other && Equals(other);
382386
}
383387

388+
public override string ToString()
389+
{
390+
return Data.ToString();
391+
}
392+
384393
public override int GetHashCode()
385394
{
386395
return Data.GetHashCode();
@@ -401,6 +410,11 @@ public bool Equals(HashMapValClass other)
401410
return Data.Equals(other.Data);
402411
}
403412

413+
public override string ToString()
414+
{
415+
return Data.ToString();
416+
}
417+
404418
public override bool Equals(object obj)
405419
{
406420
return obj is HashMapValClass other && Equals(other);

0 commit comments

Comments
 (0)