I'm trying to make a button that will delete a 3d model from the scene after it is selected.
I know that the way to delete 3d objects is by using anchor.detach(). And I can select individual models using node.select(). However, I am not sure how to access the anchor after selecting the node.
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
deleteObject(//I'm not sure how to get the anchor from the selected node//);
}
});
private void deleteObject(Anchor anchor){
anchor.detach();
}