Skip to content

Commit 45107f1

Browse files
committed
chore: remove #region blocks (non-standard)
1 parent 39f9a1c commit 45107f1

File tree

6 files changed

+1
-37
lines changed

6 files changed

+1
-37
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,6 @@ internal void InitializePrefabs()
281281
Prefabs.Initialize();
282282
}
283283

284-
#region Legacy Network Prefab List
285-
286284
[NonSerialized]
287285
private bool m_DidWarnOldPrefabList = false;
288286

@@ -342,7 +340,5 @@ internal NetworkPrefabsList MigrateOldNetworkPrefabsToNetworkPrefabsList()
342340
[FormerlySerializedAs("NetworkPrefabs")]
343341
[SerializeField]
344342
internal List<NetworkPrefab> OldPrefabList;
345-
346-
#endregion
347343
}
348344
}

com.unity.netcode.gameobjects/Tests/Editor/Serialization/BaseFastBufferReaderWriterTest.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ namespace Unity.Netcode.EditorTests
77
{
88
public abstract class BaseFastBufferReaderWriterTest
99
{
10-
11-
#region Test Types
1210
protected enum ByteEnum : byte
1311
{
1412
A,
@@ -78,7 +76,6 @@ public enum WriteType
7876
WriteDirect,
7977
WriteSafe
8078
}
81-
#endregion
8279

8380
protected abstract void RunTypeTest<T>(T valueToTest) where T : unmanaged;
8481

@@ -88,7 +85,6 @@ public enum WriteType
8885

8986
protected abstract void RunTypeArrayTestSafe<T>(T[] valueToTest) where T : unmanaged;
9087

91-
#region Helpers
9288
protected TestStruct GetTestStruct()
9389
{
9490
var random = new Random();
@@ -111,9 +107,6 @@ protected TestStruct GetTestStruct()
111107
return testStruct;
112108
}
113109

114-
#endregion
115-
116-
117110
private void RunTestWithWriteType<T>(T val, WriteType wt, FastBufferWriter.ForPrimitives _ = default) where T : unmanaged
118111
{
119112
switch (wt)

com.unity.netcode.gameobjects/Tests/Editor/Serialization/BytePackerTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ namespace Unity.Netcode.EditorTests
1010
{
1111
public class BytePackerTests
1212
{
13-
#region Test Types
14-
1513
private enum ByteEnum : byte
1614
{
1715
A,
@@ -74,8 +72,6 @@ public enum WriteType
7472
WriteAsObject
7573
}
7674

77-
#endregion
78-
7975
private unsafe void VerifyBytewiseEquality<T>(T value, T otherValue) where T : unmanaged
8076
{
8177
byte* asBytePointer = (byte*)&value;

com.unity.netcode.gameobjects/Tests/Editor/Serialization/FastBufferReaderTests.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace Unity.Netcode.EditorTests
99
{
1010
public class FastBufferReaderTests : BaseFastBufferReaderWriterTest
1111
{
12-
#region Common Checks
1312
private void WriteCheckBytes(FastBufferWriter writer, int writeSize, string failMessage = "")
1413
{
1514
Assert.IsTrue(writer.TryBeginWrite(2), "Writer denied write permission");
@@ -230,9 +229,7 @@ private void RunReadMethod<T>(string methodName, FastBufferReader reader, out T[
230229
method.Invoke(reader, args);
231230
value = (T[])args[0];
232231
}
233-
#endregion
234232

235-
#region Generic Checks
236233
protected override unsafe void RunTypeTest<T>(T valueToTest)
237234
{
238235
var writeSize = FastBufferWriter.GetWriteSize(valueToTest);
@@ -343,9 +340,6 @@ protected override unsafe void RunTypeArrayTestSafe<T>(T[] valueToTest)
343340
}
344341
}
345342

346-
#endregion
347-
348-
#region Tests
349343
[Test]
350344
public void GivenFastBufferWriterContainingValue_WhenReadingUnmanagedType_ValueMatchesWhatWasWritten(
351345
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
@@ -1220,7 +1214,5 @@ public unsafe void WhenCallingTryBeginReadInternal_AllowedReadPositionDoesNotMov
12201214
Assert.AreEqual(reader.Handle->AllowedReadMark, 25);
12211215
}
12221216
}
1223-
1224-
#endregion
12251217
}
12261218
}

com.unity.netcode.gameobjects/Tests/Editor/Serialization/FastBufferWriterTests.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ namespace Unity.Netcode.EditorTests
99
{
1010
public class FastBufferWriterTests : BaseFastBufferReaderWriterTest
1111
{
12-
13-
#region Common Checks
14-
1512
private void WriteCheckBytes(FastBufferWriter writer, int writeSize, string failMessage = "")
1613
{
1714
Assert.IsTrue(writer.TryBeginWrite(2), "Writer denied write permission");
@@ -66,10 +63,6 @@ private unsafe void CommonChecks<T>(FastBufferWriter writer, T valueToTest, int
6663
VerifyTypedEquality(valueToTest, writer.GetUnsafePtr());
6764
}
6865

69-
#endregion
70-
71-
#region Generic Checks
72-
7366
private void RunMethod<T>(string methodName, FastBufferWriter writer, in T value) where T : unmanaged
7467
{
7568
MethodInfo method = typeof(FastBufferWriter).GetMethod(methodName, new[] { typeof(T).MakeByRefType() });
@@ -248,11 +241,8 @@ protected override unsafe void RunTypeArrayTestSafe<T>(T[] valueToTest)
248241
VerifyCheckBytes(underlyingArray, writeSize);
249242
}
250243
}
251-
#endregion
252-
253244

254-
#region Tests
255-
[Test, Description("Tests ")]
245+
[Test, Description("Tests")]
256246
public void WhenWritingUnmanagedType_ValueIsWrittenCorrectly(
257247
[Values(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint),
258248
typeof(long), typeof(ulong), typeof(bool), typeof(char), typeof(float), typeof(double),
@@ -1317,6 +1307,5 @@ public unsafe void WhenCallingTryBeginWriteInternal_AllowedWritePositionDoesNotM
13171307
Assert.AreEqual(writer.Handle->AllowedWriteMark, 25);
13181308
}
13191309
}
1320-
#endregion
13211310
}
13221311
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ public IEnumerator TestINetworkSerializableStructCallsNetworkSerialize([Values(t
10101010
yield return WaitForConditionOrTimeOut(VerifyCallback);
10111011
}
10121012

1013-
#region COULD_BE_REMOVED
10141013
[UnityTest]
10151014
[Ignore("This is used several times already in the NetworkListPredicate")]
10161015
// TODO: If we end up using the new suggested pattern, then delete this
@@ -1221,7 +1220,6 @@ public void TestUnmnagedINetworkSerializableNetworkVariablesDeserializeInPlace()
12211220
Assert.AreEqual(2, variable.Value.Int, "Int was not correctly deserialized");
12221221
Assert.AreEqual("three", variable.Value.Str, "Str was not correctly deserialized");
12231222
}
1224-
#endregion
12251223

12261224
private float m_OriginalTimeScale = 1.0f;
12271225

0 commit comments

Comments
 (0)