We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d05ac2 commit 8c0b091Copy full SHA for 8c0b091
Assets/HoloToolkit/Sharing/Scripts/ServerSessionsTracker.cs
@@ -5,7 +5,9 @@
5
6
using System;
7
using System.Collections.Generic;
8
+using System.Linq;
9
using HoloToolkit.Unity;
10
+using UnityEngine;
11
12
namespace HoloToolkit.Sharing
13
{
@@ -166,8 +168,14 @@ private void OnSessionAdded(Session newSession)
166
168
167
169
private void OnSessionClosed(Session session)
170
- SessionClosed.RaiseEvent(session);
- Sessions.Remove(session);
171
+ for (int i = 0; i < Sessions.Count; i++)
172
+ {
173
+ if (Sessions[i].GetName().ToString().Equals(session.GetName().ToString()))
174
175
+ SessionClosed.RaiseEvent(session);
176
+ Sessions.Remove(session);
177
+ }
178
179
}
180
181
private void OnServerDisconnected()
0 commit comments