formatting

This commit is contained in:
max
2022-12-28 14:03:46 +01:00
parent a0fa2c9b36
commit 0d04c50612
7 changed files with 72 additions and 62 deletions

View File

@ -1,5 +1,4 @@
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using UnityEditor;
@ -7,15 +6,15 @@ using UnityEngine;
public static class SerializeReferenceInspectorMiddleMouseMenu
{
public static void ShowContextMenuForManagedReferenceOnMouseMiddleButton(this SerializedProperty property,
Rect position, IEnumerable<Func<Type, bool>> filters = null)
public static void ShowContextMenuForManagedReferenceOnMouseMiddleButton(this SerializedProperty property, Rect position, IEnumerable<Func<Type, bool>> filters = null)
{
var e = Event.current;
if (e.type != EventType.MouseDown || !position.Contains(e.mousePosition) || e.button != 2)
Event e = Event.current;
if (e.type != EventType.MouseDown || !position.Contains(e.mousePosition) || e.button != 2)
{
return;
}
property.ShowContextMenuForManagedReference(filters);
}
}
#endif