internal void Set3DModel(NSUrl modelUrl) { var url = modelUrl; SCNNode model = null; if (url != null) { model = Utilities.Load3DModel(url); } if (url != null && model != null) { customModel?.RemoveFromParentNode(); customModel?.Dispose(); customModel = null; originVis.RemoveFromParentNode(); ViewController.Instance?.SceneView?.Prepare(model, () => { AddChildNode(model); return(true); }); customModel = model; pointCloudVisualization.Hidden = true; if (boundingBox != null) { boundingBox.Hidden = true; } } else { customModel?.RemoveFromParentNode(); customModel?.Dispose(); customModel = null; AddChildNode(originVis); pointCloudVisualization.Hidden = false; if (boundingBox != null) { boundingBox.Hidden = false; } } }