Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ public virtual void OnGainedOwnership() { }
/// </summary>
public virtual void OnLostOwnership() { }

#region NetworkVariable

private bool m_VarInit = false;

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

#endregion

/// <summary>
/// Gets the local instance of a object with a given NetworkId
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,8 +1154,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
return;
}

#region INTERNAL MESSAGE

switch (messageType)
{
case NetworkConstants.CONNECTION_REQUEST:
Expand Down Expand Up @@ -1312,8 +1310,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
break;
}

#endregion

#if !UNITY_2020_2_OR_NEWER
NetworkProfiler.EndEvent();
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ internal CustomMessagingManager(NetworkManager networkManager)
m_NetworkManager = networkManager;
}

#region Unnamed

/// <summary>
/// Delegate used for incoming unnamed messages
/// </summary>
Expand Down Expand Up @@ -73,10 +71,6 @@ public void SendUnnamedMessage(ulong clientId, NetworkBuffer buffer, NetworkChan
PerformanceDataManager.Increment(ProfilerConstants.UnnamedMessageSent);
}

#endregion

#region Named

/// <summary>
/// Delegate used to handle named messages
/// </summary>
Expand Down Expand Up @@ -215,7 +209,5 @@ public void SendNamedMessage(string name, List<ulong> clientIds, Stream stream,
PerformanceDataManager.Increment(ProfilerConstants.NamedMessageSent);
}
}

#endregion
}
}
21 changes: 4 additions & 17 deletions testproject/Assets/ManualTests/Scripts/NetworkPrefabPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

public class NetworkPrefabPool : NetworkBehaviour
{
#region Inspector Exposed Properties
[Header("General Settings")]
public bool AutoSpawnEnable = true;
public float InitialSpawnDelay;
public int SpawnsPerSecond;
public int PoolSize;
public float ObjectSpeed = 10.0f;


[Header("Prefab Instance Handling")]
[Tooltip("When enabled, this will utilize the NetworkPrefabHandler to register a custom INetworkPrefabInstanceHandler")]
public bool EnableHandler;
Expand All @@ -32,9 +31,7 @@ public class NetworkPrefabPool : NetworkBehaviour
public SwitchSceneHandler SwitchScene;
public Slider SpawnSlider;
public Text SpawnSliderValueText;
#endregion

#region private properties
private bool m_IsSpawningObjects;

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

private MyCustomPrefabSpawnHandler m_MyCustomPrefabSpawnHandler;
#endregion

#region MonoBehaviour Initialization and Destruction Related Methods

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

/// <summary>
/// Handles registering the custom prefab handler
/// Handles registering the custom prefab handler
/// </summary>
private void RegisterCustomPrefabHandler()
{
Expand Down Expand Up @@ -133,8 +127,6 @@ private void Start()

}

#endregion

/// <summary>
/// Detect when we are switching scenes in order
/// to assure we stop spawning objects
Expand Down Expand Up @@ -177,10 +169,9 @@ public override void NetworkStart()
}
}

#region Object Pool Related Methods
/// <summary>
/// Determines which object is going to be spawned and then
/// initializes the object pool based on
/// initializes the object pool based on
/// </summary>
public void InitializeObjectPool()
{
Expand Down Expand Up @@ -234,12 +225,9 @@ private GameObject AddNewInstance()
m_ObjectPool.Add(obj);
return obj;
}
#endregion

#region Spawn Objects Related Methods

/// <summary>
/// Starts the
/// Starts the
/// </summary>
private void StartSpawningBoxes()
{
Expand Down Expand Up @@ -324,7 +312,6 @@ private IEnumerator SpawnObjects()
}
}
}
#endregion
}


Expand Down