Closed rogerbarton closed 4 years ago
Well, sure. Is [Shortcut]
attribute somehow superior to [MenuItem]
? Because if it's the same thing but newer, I think it'd be better to just stick with the letter, not to double things unnecessarily. And as a nit, I'd prefer if these attributes were in the DllManipulatorScript
, because is's meant to be the 'front end' for user. They may just simply forward calls to DllManipulator
.
Yes [Shortcut]
exists since 2019.1 allows you to use the shortcut manager UI to customize the shortcut etc. These settings are stored between projects (as an EditorPref I believe) so you only set them once.
I will move them to the DllManipulatorScript
...
Well, since you also use UnityEditor
namespace here (which I didn't notice previously, my bad) this should also go somewhere inside Editor folder. I think you can just simply copy this to DllManipulatorEditor
file and it'd be fine.
That's a good point, I've moved it now.
Oh and you should also add the relevant namespace for [MenuItem] too, because they aren't in UnityEditor.ShortcutManagement
That's a valid point, however its in UnityEditor
. But I realized I forgot the macro in the using
part, which I've now added.
Looks fine, thanks!
Thanks for creating this tool!
Well, I just pulled your branch to see the changes (forgetting that I already merged this PR) , and I see some additional repainting stuff going on. Is that something that could matter?
That commit "Repaint editor GUIs on shortcut" has not been merged yet.
Basically I wanted to repaint when the shortcut is triggered. However, I believe that there is still a better implementation (with actions/events) that catches all the points when a repaint is needed. So its still work in progress.
Works shortcut manager in Unity 2019.1+ Older versions work with MenuItemAttribute