Search Unity

Restoring a playable asset to version on disk

Discussion in 'Editor & General Support' started by IN_Ron, Oct 3, 2018.

  1. IN_Ron

    IN_Ron

    Joined:
    Feb 21, 2018
    Posts:
    23
    Hi,

    I'm trying to create a script that restores a timeline to the version on disk. At the moment the only way I can find to do that is to close Unity while preventing the timeline file from being saved and then re-opening Unity. Obviously I'd like that to be a lot simpler: I'm doing something similar for a scene and that's just a matter of closing and reopening the scene, but that approach that doesn't work for timelines.

    Any suggestions?

    Edit: forgot to say, this is all for working in the Editor, not when playing the game
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Version control would be the typical workflow. Just use your git, svn, etc, tools to roll back the unwanted changes to the files you want rolled back.
     
  3. IN_Ron

    IN_Ron

    Joined:
    Feb 21, 2018
    Posts:
    23
    Well, yes, I would agree to some extend. Problem is that Unity just saves local versions of files even if they are remotely locked in Perforce. That's why I'm adding some additional workflow to make people aware whether the file is available and adding some additional options, one of which is reverting the local changes (without having to restart Unity).