18 lines
474 B
C#
18 lines
474 B
C#
|
|
using UnityEngine;
|
||
|
|
using UnityEngine.Playables;
|
||
|
|
|
||
|
|
public class SubtitleTrackClip : PlayableAsset
|
||
|
|
{
|
||
|
|
public string subtitleText;
|
||
|
|
|
||
|
|
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
||
|
|
{
|
||
|
|
var playable = ScriptPlayable<SubtitleTrackBehaviour>.Create(graph);
|
||
|
|
|
||
|
|
var subtitleTrackBehaviour = playable.GetBehaviour();
|
||
|
|
subtitleTrackBehaviour.subtitleText = subtitleText;
|
||
|
|
|
||
|
|
return playable;
|
||
|
|
}
|
||
|
|
}
|