using UnityEngine; using UnityEngine.Playables; public class SubtitleTrackClip : PlayableAsset { public string subtitleText; public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { var playable = ScriptPlayable.Create(graph); var subtitleTrackBehaviour = playable.GetBehaviour(); subtitleTrackBehaviour.subtitleText = subtitleText; return playable; } }