备份,准备做双端

This commit is contained in:
FloatGaming
2026-07-30 23:15:58 +08:00
parent add675e45d
commit ec4ec53545
88 changed files with 4050 additions and 872 deletions
@@ -51,6 +51,14 @@ public class DissolveEffectController : MonoBehaviour
private float timer;
private bool playing;
// Track on-screen visibility so the continuous OutlinePulse write is skipped when the
// renderer is offscreen (nothing would be seen anyway). Assume visible until Unity tells
// us otherwise, so effects on objects that never entered the culling system still animate.
private bool isVisible = true;
private void OnBecameVisible() { isVisible = true; }
private void OnBecameInvisible() { isVisible = false; }
private void Awake()
{
targetRenderer = GetComponent<Renderer>();
@@ -85,7 +93,7 @@ public class DissolveEffectController : MonoBehaviour
{
if (effect == Effect.OutlinePulse)
{
UpdatePulse();
if (isVisible) UpdatePulse();
return;
}