--
Hey Tony! I've been doing a lot of stuff with Timeline recently, and today I wanted to create a custom Track for controlling a Conversation.
I found the existing "Conversation Track" and "Continue Conversation Track" and they were amazing references for what I wanted to set up.
As I was looking through their code, I noticed that for the Continue Conversation Track, you had to have the gameobject with the PlayableDirector selected in the Hierarchy for the PreviewUI (in editor mode) to determine the correct dialogue message to display.
The reasoning seemed to be the need to reference the PlayableDirector, in the function GetEditorContinueText on the ConversationContinueMixerBehaviour:
Code: Select all
var go = UnityEditor.Selection.activeGameObject;
if (go != null)
{
var director = go.GetComponent<PlayableDirector>();
if (director == null) director = GameObject.FindObjectOfType<PlayableDirector>();
if (director == null) Debug.Log("Select PlayableDirector GameObject to be able to preview bark clip text.");
if (director != null && director.playableAsset != null)
{ ...
Code: Select all
PlayableDirector director = playable.GetGraph().GetResolver() as PlayableDirector;
if (director != null && director.playableAsset != null) {
...