public void Destroy() { try { if (m_TextureID != 0) { UnityWebCore.DestroyView(m_TextureID); if (m_pixels != null) { m_pixelsHandler.Free(); } Destroy(m_texture); GetComponent <UnityWebViewEvents>().interactive = false; m_TextureID = 0; m_bInitialized = false; } } catch (System.Exception e) { Debug.Log(e); } }
void OnApplicationQuit() { UnityWebCore.DestroyView(m_TextureID); }