Skip to content

Commit

Permalink
fixed (ar.android) fixed error when adding model after ar is recreated
Browse files Browse the repository at this point in the history
  • Loading branch information
Priemar committed Nov 28, 2019
1 parent 7d6b031 commit d2b2976
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ar.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d2b2976

Please sign in to comment.