When/how are Playables saved?

Looking into Timeline stuff, a few questions:

  1. When and where are Timelines saved? I mean, it shows up as a .playable file in the project, but when does this happen?
  2. Is there a ‘dirty’ bit set somewhere, and can I set this in code?
  3. Is there a ‘save playable’ menu item I’m somehow missing?

The reason I ask is a) sometimes it seems my changes are not automatically saved, and b) I’m altering some settings (ex Mute) with an Editor script and those changes aren’t always saving either.

Timeline assets (and any other .playable assets) are saved when the project is saved. You can mark them as dirty using EditorUtility.SetDirty.

It’s important to note that a timeline asset contains many subassets, including tracks, playable assets representing clip data and animation clips. So it’s necessary to flag the appropriate object as dirty. For example muting a track, then setting the timeline asset as dirty will have no effect. In that case, the track must be set as dirty.