Updated UIVertical scroller to be 2022 compliant
Resolves: - https://github.com/Unity-UI-Extensions/com.unity.uiextensions/issues/410pull/413/head
parent
8004bcf39b
commit
c5a8af63f8
|
@ -191,7 +191,19 @@ namespace UnityEngine.UI.Extensions
|
|||
if (minDistance == distance[i])
|
||||
{
|
||||
focusedElementIndex = i;
|
||||
result = _arrayOfElements[i].GetComponentInChildren<Text>().text;
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
var textComponentTxtMeshPro = _arrayOfElements[i].GetComponentInChildren<TMPro.TMP_Text>();
|
||||
if (textComponentTxtMeshPro != null)
|
||||
{
|
||||
result = textComponentTxtMeshPro.text;
|
||||
}
|
||||
#else
|
||||
var textComponent = _arrayOfElements[i].GetComponentInChildren<Text>();
|
||||
if (textComponent != null)
|
||||
{
|
||||
result = textComponent.text;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (focusedElementIndex != oldFocusedElement && OnFocusChanged != null)
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{
|
||||
"name": "UnityUIExtensions",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:2bafac87e7f4b9b418d9448d219b01ab",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
|
Loading…
Reference in New Issue