We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2063c5 commit 7a5cbe8Copy full SHA for 7a5cbe8
Packages/com.unity.inputsystem/InputSystem/Editor/ControlPicker/InputControlPathEditor.cs
@@ -67,6 +67,17 @@ public void SetExpectedControlLayout(string expectedControlLayout)
67
m_ExpectedControlLayout = expectedControlLayout;
68
m_PickerDropdown?.SetExpectedControlLayout(m_ExpectedControlLayout);
69
}
70
+
71
+ public void SetExpectedControlLayoutFromAttribute()
72
+ {
73
+ var field = pathProperty.GetField();
74
+ if (field == null)
75
+ return;
76
77
+ var attribute = field.GetCustomAttribute<InputControlAttribute>();
78
+ if (attribute != null)
79
+ SetExpectedControlLayout(attribute.layout);
80
+ }
81
82
public void OnGUI()
83
{
0 commit comments