in Scripts/Editor/Utility/WitUnderstandingViewer.cs [459:487]
private void AddMultiValueUpdateItems(string path, GenericMenu menu)
{
string name = path;
int index = path.LastIndexOf('.');
if (index > 0)
{
name = name.Substring(index + 1);
}
var mvhs = Selection.activeGameObject.GetComponents<WitResponseMatcher>();
if (mvhs.Length > 1)
{
for (int i = 0; i < mvhs.Length; i++)
{
var handler = mvhs[i];
menu.AddItem(
new GUIContent($"Add {name} matcher to {Selection.activeGameObject.name}/Handler {(i + 1)}"),
false, (h) => AddNewEventHandlerPath((WitResponseMatcher) h, path), handler);
}
}
else if (mvhs.Length == 1)
{
var handler = mvhs[0];
menu.AddItem(
new GUIContent($"Add {name} matcher to {Selection.activeGameObject.name}'s Response Matcher"),
false, (h) => AddNewEventHandlerPath((WitResponseMatcher) h, path), handler);
}
}