Skip to content

Commit a75d54e

Browse files
author
lawwong
committed
Fix error when quiting game by avoiding redundant destroying ovrAvatar
1 parent 8e7dded commit a75d54e

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

  • Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/OculusVRExtension

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/Misc/OculusVRExtension/VIUOvrAvatar.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,15 @@ private void FixedUpdate()
170170
}
171171
}
172172

173-
private void OnDestroy()
174-
{
175-
if (sdkAvatar != IntPtr.Zero)
176-
{
177-
CAPI.ovrAvatar_Destroy(sdkAvatar);
178-
sdkAvatar = IntPtr.Zero;
179-
}
180-
}
173+
// FIXME: sdkAvatar should be destroy by OvrAvatar.OnDestroy
174+
//private void OnDestroy()
175+
//{
176+
// if (sdkAvatar != IntPtr.Zero)
177+
// {
178+
// CAPI.ovrAvatar_Destroy(sdkAvatar);
179+
// sdkAvatar = IntPtr.Zero;
180+
// }
181+
//}
181182

182183
public void GetReady()
183184
{

0 commit comments

Comments
 (0)