From e727f0adb3db8f9ddb03cccd379a85622f63c7cd Mon Sep 17 00:00:00 2001 From: bottlefish <781230111@qq.com> Date: Sun, 15 Jun 2025 18:47:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/FixSystemNew/Open/OpenSystem.cs | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/FixSystemNew/Open/OpenSystem.cs b/Assets/Scripts/FixSystemNew/Open/OpenSystem.cs index b6008bd29..029a97d4f 100644 --- a/Assets/Scripts/FixSystemNew/Open/OpenSystem.cs +++ b/Assets/Scripts/FixSystemNew/Open/OpenSystem.cs @@ -9,6 +9,7 @@ using UnityEngine.Timeline; using System.Collections.Generic; using DG.Tweening; using AibisDream.Utility; +using System.Linq; namespace AibisDream { @@ -158,18 +159,38 @@ namespace AibisDream public void PlayTimeline_noWait(string timelinePath) { + Debug.Log($"[Timeline Debug] 开始加载 Timeline: {timelinePath}"); + // 加载Timeline资源 var timelineAsset = Resources.Load(timelinePath); if (timelineAsset == null) { - Debug.LogError($"找不到Timeline资源: {timelinePath}"); + Debug.LogError($"[Timeline Debug] 找不到Timeline资源: {timelinePath}"); return; } + Debug.Log($"[Timeline Debug] Timeline资源加载成功: {timelinePath}"); openPlayable.playableAsset = timelineAsset; - // BindPlayToolPanel(); - // BindDialogController(); + + // 检查所有轨道的绑定状态 + var timeline = openPlayable.playableAsset as TimelineAsset; + if (timeline != null) + { + var tracks = timeline.GetOutputTracks(); + Debug.Log($"[Timeline Debug] Timeline包含 {tracks.Count()} 个轨道:"); + foreach (var track in tracks) + { + var binding = openPlayable.GetGenericBinding(track); + Debug.Log($"[Timeline Debug] 轨道: {track.name}, 绑定状态: {(binding != null ? "已绑定" : "未绑定")}, 绑定对象: {binding?.name ?? "无"}"); + } + } + + Debug.Log("[Timeline Debug] 开始播放 Timeline"); openPlayable.Play(); + + // 添加播放状态变化的监听 + openPlayable.stopped += (director) => Debug.Log("[Timeline Debug] Timeline 播放结束"); + openPlayable.paused += (director) => Debug.Log("[Timeline Debug] Timeline 暂停"); } public void FinishCut() {