2026-04-12 02:11:15 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SLSUtilities.Feedback
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 一条反馈轨道,包含按时间排列的 Clip 序列。
|
|
|
|
|
|
/// 多个 Track 天然并行播放,Track 内的 Clip 按时间顺序排列,不重叠。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Serializable]
|
2026-04-18 13:57:19 -04:00
|
|
|
|
public partial class FeedbackTrack
|
2026-04-12 02:11:15 -04:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 轨道名称,用于调试和 Inspector 显示。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[LabelText("Track Name")]
|
2026-04-18 13:57:19 -04:00
|
|
|
|
[ValueDropdown("GetTrackNamesList")]
|
2026-04-12 02:11:15 -04:00
|
|
|
|
public string trackName = "New Track";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 静音此轨道,播放时跳过。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HorizontalGroup("Flags", Width = 60)]
|
|
|
|
|
|
[LabelWidth(40)]
|
|
|
|
|
|
public bool mute;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 独奏此轨道,仅播放标记为 Solo 的轨道。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[HorizontalGroup("Flags", Width = 50)]
|
|
|
|
|
|
[LabelWidth(35)]
|
|
|
|
|
|
public bool solo;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 轨道上的片段列表。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[ListDrawerSettings(ShowFoldout = true)]
|
|
|
|
|
|
public List<FeedbackClip> clips = new List<FeedbackClip>();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 该轨道的总时长,取所有 Clip 中最大的 EndTime。
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public float TotalDuration => clips.Count > 0 ? clips.Max(c => c.EndTime) : 0f;
|
|
|
|
|
|
}
|
2026-04-18 13:57:19 -04:00
|
|
|
|
|
|
|
|
|
|
public partial class FeedbackTrack
|
|
|
|
|
|
{
|
|
|
|
|
|
private List<string> GetTrackNamesList()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new List<string>()
|
|
|
|
|
|
{
|
|
|
|
|
|
"Camera", "Time", "Postprocessing", "Audio"
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-04-12 02:11:15 -04:00
|
|
|
|
}
|