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

Other PlayableDirector Bindings Restorer

Discussion in 'Timeline' started by V0odo0, Nov 23, 2022.

  1. V0odo0

    V0odo0

    Joined:
    Jan 8, 2012
    Posts:
    327
    PlayableDirector component is losing scene references outside of his hierarchy after dragging it back on the scene as prefab. I made a simple Editor script that restores track object references (bindings) from the scene. Might be useful for some cases as mine.

    https://gist.github.com/V0odo0/ad19a504c563f8dcbf054b8b328f805a

    How to use:
    1. Add PlayableDirectorBindingsRestorer to your object and assign target PlayableDirector
    2. Click Save Bindings in "..." context menu of the component
    3. Save object as prefab, drag it back on the scene and use Restore Bindings
     
    Yuchen_Chang likes this.