mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 08:18:49 -05:00
30 lines
809 B
C#
30 lines
809 B
C#
using UnityEditorInternal;
|
|
using UnityEngine;
|
|
|
|
namespace TriInspectorUnityInternalBridge
|
|
{
|
|
internal static class ReorderableListProxy
|
|
{
|
|
public static void DoListHeader(ReorderableList list, Rect headerRect)
|
|
{
|
|
if (list.showDefaultBackground && Event.current.type == EventType.Repaint)
|
|
{
|
|
ReorderableList.defaultBehaviours.DrawHeaderBackground(headerRect);
|
|
}
|
|
|
|
headerRect.xMin += 6f;
|
|
headerRect.xMax -= 6f;
|
|
headerRect.height -= 2f;
|
|
headerRect.y += 1;
|
|
|
|
list.drawHeaderCallback?.Invoke(headerRect);
|
|
}
|
|
|
|
public static void ClearCacheRecursive(ReorderableList list)
|
|
{
|
|
#if UNITY_2020_2_OR_NEWER
|
|
list.ClearCacheRecursive();
|
|
#endif
|
|
}
|
|
}
|
|
} |