Initial commit

This commit is contained in:
2026-02-18 12:00:34 +00:00
commit 5d353cf5fa
1947 changed files with 335322 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Search;
namespace UnityEngine.InputSystem.Editor
{
/// <summary>
/// Custom property drawer in order to use the "Advanced Picker" from UnityEditor.Search.
/// </summary>
[CustomPropertyDrawer(typeof(InputActionAsset))]
internal sealed class InputActionAssetDrawer : PropertyDrawer
{
private readonly SearchContext m_Context = UnityEditor.Search.SearchService.CreateContext(new[]
{
InputActionAssetSearchProviders.CreateInputActionAssetSearchProvider(),
InputActionAssetSearchProviders.CreateInputActionAssetSearchProviderForProjectWideActions(),
}, string.Empty, SearchConstants.PickerSearchFlags);
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
ObjectField.DoObjectField(position, property, typeof(InputActionAsset), label,
m_Context, SearchConstants.PickerViewFlags);
}
}
}
#endif