private void Start() { meshRender = GetComponent <MeshRenderer>(); originalMaterial = meshRender.material; holoTable = GetComponentInParent <HoloTable>(); }
public void OnInteraction(GameObject other) { if (holoTable == null) { holoTable = GetComponentInParent <HoloTable>(); } holoTable.SelectAttachPoint(this); }
public void OnInteraction(GameObject other) { if (!enabled) { return; } if (parentPoint != null) { parentPoint.gameObject.SetActive(true); HoloTable ht = GetComponentInParent <HoloTable>(); ht.PartRemoved(this); } Destroy(gameObject); }