I'm trying to create a custom editor script on Unity, and I'd like to have quite a few shortcuts for different reasons. Is there any way to create shortcuts that trigger an event in the Editor? Creating a custom editor just to edit the shortcuts of the first editor is impossible for me since I don't have that much time, but it would really help me to be able to change my own shortcuts easily.
As of now this is my code:
static void EditorGlobalKeyPress()
{
Event current = Event.current;
if ((!current.alt && !current.control)|| current.type != EventType.KeyUp) return;
switch (Event.current.keyCode)
{
case KeyCode.L:
// Load stuff
break;
case KeyCode.U:
// Unload stuff
break;
default:
break;
}
}
And while it works fine, having editable shortcuts would be great. Does anyone know if it's possible in some way?


