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
10 changes: 3 additions & 7 deletions com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,13 @@ private void Init(bool server)
if (RpcQueueContainer != null)
{
UnityEngine.Debug.LogError("Init was invoked, but rpcQueueContainer was already initialized! (destroying previous instance)");
RpcQueueContainer.Shutdown();
RpcQueueContainer.Dispose();
RpcQueueContainer = null;
}

//The RpcQueueContainer must be initialized within the Init method ONLY
//It should ONLY be shutdown and destroyed in the Shutdown method (other than just above)
RpcQueueContainer = new RpcQueueContainer(false);

//Note: Since frame history is not being used, this is set to 0
//To test frame history, increase the number to (n) where n > 0
RpcQueueContainer.Initialize(0);
RpcQueueContainer = new RpcQueueContainer(this);

// Register INetworkUpdateSystem (always register this after rpcQueueContainer has been instantiated)
this.RegisterNetworkUpdate(NetworkUpdateStage.EarlyUpdate);
Expand Down Expand Up @@ -608,7 +604,7 @@ public void Shutdown()
//If an instance of the RpcQueueContainer is still around, then shut it down and remove the reference
if (RpcQueueContainer != null)
{
RpcQueueContainer.Shutdown();
RpcQueueContainer.Dispose();
RpcQueueContainer = null;
}

Expand Down
Loading