After testing this for 3 hours - I don’t think all editor events work in brush.
I can’t get any of these to work in Paint method, but I can tap into some events by adding a callback method to SceneView:
SceneView.onSceneGUIDelegate += OnSceneGUI;
However, key events like key up don’t seem to work, and not even all the modifier keys work. Then again, I have no idea if these are even supposed to work from GridBrush methods.
You will not be able to capture the modifier keys within the tool methods such as Paint, as they are being used to trigger the tool methods themselves.
You can instead capture the events from the Editor of your GridBrush (derived from GridBrushEditor/Base) using the OnPaintSceneGUI callback and do your custom behaviour there?
Thank you for the info! It will most likely be helpful.
I haven’t touched GridBrushEditor class, so I’ll have to read about it.
So far I managed to do most if not everything I need from onSceneGUIDelegate attached method, using only keys that are not reserved by Tilemap brush :).