Skip to content

Commit c876ad9

Browse files
authored
chore: remove #region blocks to better comply with coding standards (#777)
1 parent cc3ab42 commit c876ad9

File tree

4 files changed

+4
-33
lines changed

4 files changed

+4
-33
lines changed

com.unity.multiplayer.mlapi/Runtime/Core/NetworkBehaviour.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,6 @@ public virtual void OnGainedOwnership() { }
385385
/// </summary>
386386
public virtual void OnLostOwnership() { }
387387

388-
#region NetworkVariable
389-
390388
private bool m_VarInit = false;
391389

392390
private readonly List<HashSet<int>> m_ChannelMappedNetworkVariableIndexes = new List<HashSet<int>>();
@@ -999,8 +997,6 @@ internal static void SetNetworkVariableData(List<INetworkVariable> networkVariab
999997
}
1000998
}
1001999

1002-
#endregion
1003-
10041000
/// <summary>
10051001
/// Gets the local instance of a object with a given NetworkId
10061002
/// </summary>

com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
11541154
return;
11551155
}
11561156

1157-
#region INTERNAL MESSAGE
1158-
11591157
switch (messageType)
11601158
{
11611159
case NetworkConstants.CONNECTION_REQUEST:
@@ -1312,8 +1310,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
13121310
break;
13131311
}
13141312

1315-
#endregion
1316-
13171313
#if !UNITY_2020_2_OR_NEWER
13181314
NetworkProfiler.EndEvent();
13191315
#endif

com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ internal CustomMessagingManager(NetworkManager networkManager)
2323
m_NetworkManager = networkManager;
2424
}
2525

26-
#region Unnamed
27-
2826
/// <summary>
2927
/// Delegate used for incoming unnamed messages
3028
/// </summary>
@@ -73,10 +71,6 @@ public void SendUnnamedMessage(ulong clientId, NetworkBuffer buffer, NetworkChan
7371
PerformanceDataManager.Increment(ProfilerConstants.UnnamedMessageSent);
7472
}
7573

76-
#endregion
77-
78-
#region Named
79-
8074
/// <summary>
8175
/// Delegate used to handle named messages
8276
/// </summary>
@@ -215,7 +209,5 @@ public void SendNamedMessage(string name, List<ulong> clientIds, Stream stream,
215209
PerformanceDataManager.Increment(ProfilerConstants.NamedMessageSent);
216210
}
217211
}
218-
219-
#endregion
220212
}
221213
}

testproject/Assets/ManualTests/Scripts/NetworkPrefabPool.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77

88
public class NetworkPrefabPool : NetworkBehaviour
99
{
10-
#region Inspector Exposed Properties
1110
[Header("General Settings")]
1211
public bool AutoSpawnEnable = true;
1312
public float InitialSpawnDelay;
1413
public int SpawnsPerSecond;
1514
public int PoolSize;
1615
public float ObjectSpeed = 10.0f;
1716

18-
17+
1918
[Header("Prefab Instance Handling")]
2019
[Tooltip("When enabled, this will utilize the NetworkPrefabHandler to register a custom INetworkPrefabInstanceHandler")]
2120
public bool EnableHandler;
@@ -32,9 +31,7 @@ public class NetworkPrefabPool : NetworkBehaviour
3231
public SwitchSceneHandler SwitchScene;
3332
public Slider SpawnSlider;
3433
public Text SpawnSliderValueText;
35-
#endregion
3634

37-
#region private properties
3835
private bool m_IsSpawningObjects;
3936

4037
private float m_EntitiesPerFrame;
@@ -44,9 +41,6 @@ public class NetworkPrefabPool : NetworkBehaviour
4441
private List<GameObject> m_ObjectPool;
4542

4643
private MyCustomPrefabSpawnHandler m_MyCustomPrefabSpawnHandler;
47-
#endregion
48-
49-
#region MonoBehaviour Initialization and Destruction Related Methods
5044

5145
/// <summary>
5246
/// Called when enabled, if already connected we register any custom prefab spawn handler here
@@ -63,7 +57,7 @@ private void OnEnable()
6357
}
6458

6559
/// <summary>
66-
/// Handles registering the custom prefab handler
60+
/// Handles registering the custom prefab handler
6761
/// </summary>
6862
private void RegisterCustomPrefabHandler()
6963
{
@@ -133,8 +127,6 @@ private void Start()
133127

134128
}
135129

136-
#endregion
137-
138130
/// <summary>
139131
/// Detect when we are switching scenes in order
140132
/// to assure we stop spawning objects
@@ -177,10 +169,9 @@ public override void NetworkStart()
177169
}
178170
}
179171

180-
#region Object Pool Related Methods
181172
/// <summary>
182173
/// Determines which object is going to be spawned and then
183-
/// initializes the object pool based on
174+
/// initializes the object pool based on
184175
/// </summary>
185176
public void InitializeObjectPool()
186177
{
@@ -234,12 +225,9 @@ private GameObject AddNewInstance()
234225
m_ObjectPool.Add(obj);
235226
return obj;
236227
}
237-
#endregion
238-
239-
#region Spawn Objects Related Methods
240228

241229
/// <summary>
242-
/// Starts the
230+
/// Starts the
243231
/// </summary>
244232
private void StartSpawningBoxes()
245233
{
@@ -324,7 +312,6 @@ private IEnumerator SpawnObjects()
324312
}
325313
}
326314
}
327-
#endregion
328315
}
329316

330317

0 commit comments

Comments
 (0)