void Update() { if (!Active) { return; } if (!CameraControler.IsInputFieldFocused()) { if (AllowRemove && Input.GetKeyDown(KeyCode.Delete)) { DestroySelectedObjects(); } if (Input.GetKeyDown(KeyCode.C) && Input.GetKey(KeyCode.LeftControl)) { //Copy CopyAction?.Invoke(); } else if (Input.GetKeyDown(KeyCode.V) && Input.GetKey(KeyCode.LeftControl)) { //Paste PasteAction?.Invoke(); } else if (Input.GetKeyDown(KeyCode.D) && Input.GetKey(KeyCode.LeftControl)) { //Duplicate DuplicateAction?.Invoke(); } } }
public static void ExecuteDuplicateAction() { if (Current.Active && !CameraControler.IsInputFieldFocused()) { DuplicateAction?.Invoke(); } }
/// <summary> /// Fire Duplicate Action Event /// </summary> protected virtual void OnDuplicateAction(object sender, ActionEditorControlEventArgs args) { try { DuplicateAction?.Invoke(sender, args); } catch (Exception caught) { logger.Error("Unexpected Error Firing Duplicate Action Event", caught); throw; } }