From 0e1604d18b0b8df024dc2b2ca0b771de5a2d62d7 Mon Sep 17 00:00:00 2001 From: bottlefish <781230111@qq.com> Date: Sat, 25 Jul 2026 21:25:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(dreamdoor):=20=E4=BF=AE=E5=A4=8D=E6=98=9F?= =?UTF-8?q?=E7=A9=BA=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AF=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=8F=98=E9=97=A8=E7=A9=BF=E5=B8=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- Assets/Scenes/梦境.unity | 4 +++- .../TimelineKit/StarfieldDefocusController.cs | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Assets/Scenes/梦境.unity b/Assets/Scenes/梦境.unity index fd5989550..d467b0de8 100644 --- a/Assets/Scenes/梦境.unity +++ b/Assets/Scenes/梦境.unity @@ -738,6 +738,8 @@ MonoBehaviour: blackoutFadeInDuration: 0.08 blackoutFadeOutDuration: 0.12 morphStartTimelineName: "\u59D0\u59D0/\u5934\u75DB" + hideOnTerminal: + - {fileID: 1420961917} --- !u!1 &450371654 GameObject: m_ObjectHideFlags: 0 @@ -1841,7 +1843,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &1420961918 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/SceneManagement/TimelineKit/StarfieldDefocusController.cs b/Assets/Scripts/SceneManagement/TimelineKit/StarfieldDefocusController.cs index 747efc7e9..5b9b6e6f8 100644 --- a/Assets/Scripts/SceneManagement/TimelineKit/StarfieldDefocusController.cs +++ b/Assets/Scripts/SceneManagement/TimelineKit/StarfieldDefocusController.cs @@ -109,6 +109,7 @@ namespace AibisDream return; } + EnsureStarfieldActive(); director.Stop(); SetTimelineTime(0f); } @@ -120,6 +121,8 @@ namespace AibisDream yield break; } + EnsureStarfieldActive(); + float startTime; float endTime; switch (attempt) @@ -159,6 +162,7 @@ namespace AibisDream yield break; } + EnsureStarfieldActive(); director.Pause(); SetTimelineTime(blurFadeStart); director.Play(); @@ -195,9 +199,23 @@ namespace AibisDream return; } + // Fiction 等路径可能只 play_timeline、不走 starfield_prepare; + // Timeline 只 key 了「海浪」的 Active,不会打开「星空」。 + if (director.state == PlayState.Playing) + EnsureStarfieldActive(); + ApplyAtTime((float)director.time); } + /// + /// 场景「星空」默认 inactive(与「海浪」一致)。演出开始时打开。 + /// + private void EnsureStarfieldActive() + { + if (starfieldRenderer != null && !starfieldRenderer.gameObject.activeSelf) + starfieldRenderer.gameObject.SetActive(true); + } + private bool TryValidateReferences() { if (director == null)