1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

ignoring events with delta zero improves performance a lot, specially on macOS (it recevies a lot of unnecessary EventType.MouseMove events)

This commit is contained in:
Zalo 2018-05-23 11:18:21 +02:00
parent 8f658d2762
commit ff60dfc34b

View File

@ -277,6 +277,9 @@ namespace XNodeEditor {
private void DrawNodes() { private void DrawNodes() {
Event e = Event.current; Event e = Event.current;
if (e.delta != Vector2.zero) {
return;
}
if (e.type == EventType.Layout) { if (e.type == EventType.Layout) {
selectionCache = new List<UnityEngine.Object>(Selection.objects); selectionCache = new List<UnityEngine.Object>(Selection.objects);
} }