refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -111,9 +111,8 @@ namespace Cryville.Crtr.Config.UI {
}
float GetRatioFromPos(Vector2 pos) {
Vector2 lp;
RectTransform handleArea = parent.m_handleArea;
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(handleArea, pos, cam, out lp)) {
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(handleArea, pos, cam, out Vector2 lp)) {
lp -= handleArea.rect.position;
return Mathf.Clamp01(lp.x / handleArea.rect.width);
}
@@ -121,8 +120,7 @@ namespace Cryville.Crtr.Config.UI {
}
void SetValueFromPos(Vector2 pos) {
double min, max;
parent.GetRange(out min, out max);
parent.GetRange(out double min, out double max);
double ratio = GetRatioFromPos(pos);
double result = parent.GetValue(ratio, Time.deltaTime, min, max);
if (result < min) result = min;