Files
MMORPG/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/VisualElementExtensions.cs
cooney ce83f21c93 UI 자동화를 위해 바인딩 기능 구현
- 유니티 에셋 인증 오류로 meta 재생성
2026-01-25 01:31:34 +09:00

23 lines
661 B
C#

#if UNITY_EDITOR
using System;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Editor
{
internal static class VisualElementExtensions
{
public static TElement Q<TElement>(this VisualElement visualElement, string name) where TElement : VisualElement
{
var element = UQueryExtensions.Q<TElement>(visualElement, name);
if (element == null)
throw new InvalidOperationException(
$"Expected a visual element called '{name}' of type '{typeof(TElement)}' to exist " +
$"but none was found.");
return element;
}
}
}
#endif