We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57a1891 commit 290cec0Copy full SHA for 290cec0
Assets/HoloToolkit/Utilities/Scripts/SingleInstance.cs
@@ -32,7 +32,12 @@ public static T Instance
32
}
33
34
35
- protected void OnDestroy()
+ /// <summary>
36
+ /// Called by Unity when destroying a MonoBehaviour. Scripts that extend
37
+ /// SingleInstance should be sure to call base.OnDestroy() to ensure the
38
+ /// underlying static _Instance reference is properly cleaned up.
39
+ /// </summary>
40
+ protected virtual void OnDestroy()
41
{
42
_Instance = null;
43
0 commit comments