public static void ExecutePasteAction() { if (Current.Active && !CameraControler.IsInputFieldFocused()) { PasteAction?.Invoke(); } }
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(); } } }