protected override void OnActionUp() { if (picked) { if (m_attaching) { m_picked = false; } else { Release(); } } else { if (transform.parent && transform.parent.parent) { VivePickable corkParent = transform.parent.parent.GetComponent <VivePickable>(); if (corkParent && corkParent.picked) { corkParent.Release(); } } } }
public void RemoveSelection() { if (!m_outlinedItem) { return; } if (m_targetVivePickable) { m_targetVivePickable.Release(); m_targetVivePickable = null; } Destroy(m_outlinedItem.gameObject); m_outlinedItem = null; }
protected override void OnActionUp() { if (picked) { Release(); } else { ViveCork cork = GetComponent <ViveCork>(); if (cork && cork.transform.parent && cork.transform.parent.parent) { VivePickable corkParent = cork.transform.parent.parent.GetComponent <VivePickable>(); if (corkParent && corkParent.picked) { corkParent.Release(); } } } }