This commit is contained in:
陈思海 2025-08-06 10:56:25 +08:00
parent 3e557e4235
commit 031dd8374a
5 changed files with 68 additions and 15 deletions

View File

@ -5,8 +5,7 @@
"GUID:6546d7765b4165b40850b3667f981c26", "GUID:6546d7765b4165b40850b3667f981c26",
"GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:760f1778adc613f49a4394fb41ff0bbc", "GUID:760f1778adc613f49a4394fb41ff0bbc",
"GUID:75b6f2078d190f14dbda4a5b747d709c", "GUID:75b6f2078d190f14dbda4a5b747d709c"
"GUID:acfef7cabed3b0a42b25edb1cd4fa259"
], ],
"includePlatforms": [ "includePlatforms": [
"Editor" "Editor"
@ -17,6 +16,17 @@
"precompiledReferences": [], "precompiledReferences": [],
"autoReferenced": true, "autoReferenced": true,
"defineConstraints": [], "defineConstraints": [],
"versionDefines": [], "versionDefines": [
{
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TEXTMESHPRO_SUPPORT"
},
{
"name": "com.unity.textmeshpro",
"expression": "",
"define": "TEXTMESHPRO_SUPPORT"
}
],
"noEngineReferences": false "noEngineReferences": false
} }

View File

@ -1,6 +1,6 @@
#if TEXTMESHPRO_SUPPORT
using UnityEditor; using UnityEditor;
namespace UnityEngine.UI namespace UnityEngine.UI
{ {
[CustomEditor(typeof(UXTextMeshPro), true)] [CustomEditor(typeof(UXTextMeshPro), true)]
@ -30,3 +30,4 @@ namespace UnityEngine.UI
} }
} }
} }
#endif

View File

@ -3,7 +3,6 @@
"rootNamespace": "AlicizaX.UI.Extension", "rootNamespace": "AlicizaX.UI.Extension",
"references": [ "references": [
"GUID:6055be8ebefd69e48b49212b09b47b2f", "GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:75b6f2078d190f14dbda4a5b747d709c",
"GUID:80ecb87cae9c44d19824e70ea7229748" "GUID:80ecb87cae9c44d19824e70ea7229748"
], ],
"includePlatforms": [], "includePlatforms": [],
@ -13,6 +12,22 @@
"precompiledReferences": [], "precompiledReferences": [],
"autoReferenced": true, "autoReferenced": true,
"defineConstraints": [], "defineConstraints": [],
"versionDefines": [], "versionDefines": [
{
"name": "com.unity.ugui",
"expression": "2.0.0",
"define": "TEXTMESHPRO_SUPPORT"
},
{
"name": "com.unity.textmeshpro",
"expression": "",
"define": "TEXTMESHPRO_SUPPORT"
},
{
"name": "com.kyrylokuzyk.primetween",
"expression": "1.2.1",
"define": "PRIMETWEEN_SUPPORT"
}
],
"noEngineReferences": false "noEngineReferences": false
} }

View File

@ -1,5 +1,4 @@
using System; using System;
using PrimeTween;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
@ -35,11 +34,19 @@ namespace AlicizaX.UI.RecyclerView
if (scrollbar.direction == Scrollbar.Direction.TopToBottom || if (scrollbar.direction == Scrollbar.Direction.TopToBottom ||
scrollbar.direction == Scrollbar.Direction.BottomToTop) scrollbar.direction == Scrollbar.Direction.BottomToTop)
{ {
Tween.ScaleX(handle, 1f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleX(handle, 1f, 0.2f);
#else
handle.localScale = new Vector3(1,handle.localScale.y,handle.localScale.z);
#endif
} }
else else
{ {
Tween.ScaleY(handle, 1f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleY(handle, 1f, 0.2f);
#else
handle.localScale = new Vector3(handle.localScale.x,1,handle.localScale.z);
#endif
} }
} }
@ -52,11 +59,20 @@ namespace AlicizaX.UI.RecyclerView
if (scrollbar.direction == Scrollbar.Direction.TopToBottom || if (scrollbar.direction == Scrollbar.Direction.TopToBottom ||
scrollbar.direction == Scrollbar.Direction.BottomToTop) scrollbar.direction == Scrollbar.Direction.BottomToTop)
{ {
Tween.ScaleX(handle, 2f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleX(handle, 2f, 0.2f);
#else
handle.localScale = new Vector3(2,handle.localScale.y,handle.localScale.z);
#endif
} }
else else
{ {
Tween.ScaleY(handle, 2f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleY(handle, 2f, 0.2f);
#else
handle.localScale = new Vector3(handle.localScale.x, 2, handle.localScale.z);
#endif
} }
} }
@ -68,11 +84,19 @@ namespace AlicizaX.UI.RecyclerView
if (scrollbar.direction == Scrollbar.Direction.TopToBottom || if (scrollbar.direction == Scrollbar.Direction.TopToBottom ||
scrollbar.direction == Scrollbar.Direction.BottomToTop) scrollbar.direction == Scrollbar.Direction.BottomToTop)
{ {
Tween.ScaleX(handle, 1f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleX(handle, 1f, 0.2f);
#else
handle.localScale = new Vector3(1,handle.localScale.y,handle.localScale.z);
#endif
} }
else else
{ {
Tween.ScaleY(handle, 1f, 0.2f); #if PRIMETWEEN_SUPPORT
PrimeTween.Tween.ScaleY(handle, 1f, 0.2f);
#else
handle.localScale = new Vector3(handle.localScale.x,1,handle.localScale.z);
#endif
} }
} }
} }

View File

@ -1,4 +1,5 @@
using System; #if TEXTMESHPRO_SUPPORT
using TMPro; using TMPro;
namespace UnityEngine.UI namespace UnityEngine.UI
@ -33,3 +34,5 @@ namespace UnityEngine.UI
} }
} }
} }
#endif