Search Unity

Question Binding a ScriptableObject to a PlayableTrack

Discussion in 'Timeline' started by dchakrabarty, Nov 17, 2020.

  1. dchakrabarty

    dchakrabarty

    Joined:
    Mar 1, 2019
    Posts:
    4
    As I try to bind a ScriptableObject to a playable track, I get a warning "Bound object is a prefab". However, It works alright. What is this warning all about and are ScriptableObjects supported in timeline track binding?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Bindings are intended for gameObjects and components. They cannot be stored in the timeline itself so they are stored in a lookup table inside the PlayableDirector. The warning information obviously isn't correct, but it is detecting that the bound object is an asset (and incorrectly identifying it as a prefab).

    If your track needs to reference a ScriptableObject, you can simply make it a field on your custom track and assign it in the inspector. The drawback is it does not show up in the track header.