using UnityEngine;
using UnityEngine.Playables;
using System.Collections;

public class DirectoryManager : MonoBehaviour
{
    private PlayableDirector _director;

    private IEnumerator Start()
    {
        yield return null;

        _director = GetComponentInChildren<PlayableDirector>(true);

        if (_director == null)
        {
            Debug.LogError("PlayableDirector not found");
            yield break;
        }

        Time.timeScale = 1f;
        _director.Stop();
        _director.time = 0;
        _director.Evaluate();
        _director.Play();

        Debug.Log("Timeline started after delay");
    }
}
