From d2b29764f9bf37435b577a1dba58094f3e95183b Mon Sep 17 00:00:00 2001 From: Priemar Date: Thu, 28 Nov 2019 09:49:27 +0100 Subject: [PATCH] fixed (ar.android) fixed error when adding model after ar is recreated --- src/ar.android.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ar.android.ts b/src/ar.android.ts index 508aac4..d2f8fca 100644 --- a/src/ar.android.ts +++ b/src/ar.android.ts @@ -269,6 +269,11 @@ export class AR extends ARBase { disposeNativeView(): void { super.disposeNativeView(); + // (fix: #90) remove anchor node + if (_origin) { + _origin.setParent(null); + _origin = null; + } // destroy AR fragment const supportFragmentManager = (application.android.foregroundActivity || application.android.startActivity).getSupportFragmentManager(); supportFragmentManager.beginTransaction().remove(_fragment).commit();