private void DeleteBlockTest() { var addBlock = FindObjectOfType <ViewBlock>(); Debug.Assert(me.ComponentsLength == 6); Debug.Assert(vml.componentBindings.Count == 6); Debug.Assert(me.BlocksLength == 2); vml.Delete(addBlock.binding); Debug.Assert(me.BlocksLength == 1); Debug.Assert(me.ComponentsLength == 3); }
IEnumerator CheckOnEnter() { while (true) { if (toDelete != null && ViveInput.GetPressUp(selectedHand, ControllerButton.Grip)) { if (toDelete.GetComponent <ViewLink>() != null) { vml.DeleteLink(toDelete.GetComponent <ViewLink>().binding); Debug.Log("Deleted links if any"); } else if (toDelete.GetComponent <ViewBlock>() != null) { vml.Delete(toDelete.GetComponent <ViewBlock>().binding); } } yield return(null); } }