Skip to content

Commit a32b628

Browse files
committed
Make sure that we disconnect from the OSVR server when the game object is destroyed.
1 parent 3fd65cd commit a32b628

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/ClientKit.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ void FixedUpdate()
6262
{
6363
context.update();
6464
}
65+
66+
void OnDestroy()
67+
{
68+
Debug.Log("Disconnecting from OSVR server.");
69+
context = null;
70+
}
6571
}
6672
}
6773
}

0 commit comments

Comments
 (0)