private void Awake() { // Get parent section and listen to button component. section = GetComponentInParent <ScanSection>(); GetComponent <UIElement>().onHandClick.AddListener(delegate { ToggleEditMode(); }); UpdateActivationCue(); }
void CreateGrabbbable() { // Create a new scan section and send it our cut mesh. NewScanSection = Instantiate(scanSectionTemplate); NewScanSection.transform.position = cutter.SelectionBounds.center; NewScanSection.SetScannedMesh(cutter.CopyMesh); SetupCollider(); // Call event. Created?.Invoke(); }