public void Destroy()
 {
     MainThreadContext.RunOnUiThread(() =>
     {
         anchorNode.Renderable = null;
         anchorNode.SetParent(null);
     });
 }
        public void SetColor(Material material)
        {
            color = material;

            MainThreadContext.RunOnUiThread(() =>
            {
                anchorNode.Renderable = null;
                //TODO: See https://github.com/xamarin/XamarinComponents/issues/584
                // nodeRenderable = ShapeFactory.MakeSphere(0.1f, new Vector3(0.0f, 0.15f, 0.0f), color);
                anchorNode.Renderable = nodeRenderable;
            });
        }
        public void Render(ArFragment arFragment)
        {
            MainThreadContext.RunOnUiThread(() =>
            {
                //TODO: See https://github.com/xamarin/XamarinComponents/issues/584
                //nodeRenderable = ShapeFactory.MakeSphere(0.1f, new Vector3(0.0f, 0.15f, 0.0f), color);
                anchorNode.Renderable = nodeRenderable;
                anchorNode.SetParent(arFragment.ArSceneView.Scene);

                TransformableNode sphere = new TransformableNode(arFragment.TransformationSystem);
                sphere.SetParent(anchorNode);
                sphere.Renderable = nodeRenderable;
                sphere.Select();
            });
        }