Skip to content

Instantly share code, notes, and snippets.

@rob5300
Created August 26, 2018 20:18
Show Gist options
  • Save rob5300/90a5f1d7e9b749023773f3624934f3c8 to your computer and use it in GitHub Desktop.
Save rob5300/90a5f1d7e9b749023773f3624934f3c8 to your computer and use it in GitHub Desktop.
Dialogue Trigger Clip example
using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
[Serializable]
public class DialogueTriggerClip : PlayableAsset, ITimelineClipAsset
{
public DialogueTriggerBehaviour template = new DialogueTriggerBehaviour ();
public ClipCaps clipCaps
{
get { return ClipCaps.None; }
}
public override Playable CreatePlayable (PlayableGraph graph, GameObject owner)
{
return ScriptPlayable<DialogueTriggerBehaviour>.Create (graph, template);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment