Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Adding Alembic Track and Clip to Timeline via script

Discussion in 'Timeline' started by RoughSpaghetti3211, Apr 1, 2022.

  1. RoughSpaghetti3211


    Aug 11, 2015
    for the life of me, I can't seem to add my alembic gameObj in the scene to timeline using a script. This is not runtime just an editor button. Please help.

    Code (CSharp):
    1.        PlayableDirector playableDirector =  GameObject.Find("TimeLine").GetComponent<PlayableDirector>();
    2.         playableDirector.playableAsset = timeline;
    3.         foreach (TrackAsset track in timeline.GetOutputTracks())
    4.         {
    5.             if( == "Alembic Track")
    6.             {
    7.                 Debug.Log(;
    8.                 playableDirector.SetGenericBinding(track, AbcGameObject);
    9.             }
    10.         }