超大量的更新 修复很多问题,gameplay特效初步

This commit is contained in:
FloatGaming
2026-02-14 23:46:20 +08:00
parent ef8eb67259
commit 3a7a0b4669
360 changed files with 85670 additions and 4144 deletions
@@ -1,9 +1,9 @@
using UnityEngine;
using UnityEngine;
public class WebViewPanelFollower : MonoBehaviour
{
public RectTransform panelRect; // קҪ UI Panel RectTransform
public Camera uiCamera; // UI ͨ Canvas Event Camera
public RectTransform panelRect; // Documentation text normalized.
public Camera uiCamera; // Documentation text normalized.
private Rect lastPanelRect;
private WebViewWin32.RECT lastUnityWindowRect;
@@ -43,17 +43,17 @@ public class WebViewPanelFollower : MonoBehaviour
if (panelRect == null || uiCamera == null || WebViewLauncher.Instance == null)
return;
// ȡǰ panel Ļ
// Documentation text normalized.
Rect currentPanelRect = GetPanelScreenRect(panelRect);
// ȡǰ Unity λã build Ҫ
// Documentation text normalized.
#if !UNITY_EDITOR
WebViewWin32.RECT currentUnityWindowRect = new WebViewWin32.RECT();
if (!WebViewWin32.TryGetClientScreenRect(System.Diagnostics.Process.GetCurrentProcess(), out currentUnityWindowRect))
return;
#endif
// ǷҪ
// Update position when first initialized, panel rect changed, or window rect changed.
if (!hasLastRect ||
!ApproximatelyEqual(currentPanelRect, lastPanelRect)
#if !UNITY_EDITOR
@@ -63,18 +63,16 @@ public class WebViewPanelFollower : MonoBehaviour
{
int x, y;
#if UNITY_EDITOR
// ڱ༭УֱʹĻĻϽǣ
x = Mathf.RoundToInt(currentPanelRect.x);
y = Mathf.RoundToInt(Screen.height - currentPanelRect.y - currentPanelRect.height);
#else
// build Уʹ Unity λ +
x = Mathf.RoundToInt(currentUnityWindowRect.Left + currentPanelRect.x);
y = Mathf.RoundToInt(currentUnityWindowRect.Top + (Screen.height - currentPanelRect.y - currentPanelRect.height));
#endif
int w = Mathf.RoundToInt(currentPanelRect.width);
int h = Mathf.RoundToInt(currentPanelRect.height);
// WebView
// Documentation text normalized.
bool success = WebViewLauncher.Instance.TryUpdateWebViewRect(x, y, w, h);
if (success)
{