Hide header in reference type dropdown

This commit is contained in:
VladV 2022-05-09 11:24:02 +03:00
parent 0d0ec09bf4
commit 5a7b20958f
3 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Linq;
using TriInspectorUnityInternalBridge;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;
@ -16,6 +17,7 @@ namespace TriInspector.Utilities
{
var dropdown = new ReferenceTypeDropDown(property, new AdvancedDropdownState());
dropdown.Show(rect);
AdvancedDropdownProxy.SetShowHeader(dropdown, false);
Event.current.Use();
}
}

View File

@ -0,0 +1,12 @@
using UnityEditor.IMGUI.Controls;
namespace TriInspectorUnityInternalBridge
{
internal class AdvancedDropdownProxy
{
public static void SetShowHeader(AdvancedDropdown dropdown, bool showHeader)
{
dropdown.m_WindowInstance.showHeader = showHeader;
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fbe08837c89a44e29ea221ffeadb811d
timeCreated: 1652084409