UI 자동화를 위해 바인딩 기능 구현
- 유니티 에셋 인증 오류로 meta 재생성
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user