Search Unity

CustomPreview for Timeline Clip

Discussion in 'Timeline' started by Antoine_OSG, Feb 1, 2018.

  1. Antoine_OSG

    Antoine_OSG

    Joined:
    Sep 2, 2016
    Posts:
    43
    Hello,
    I'm trying to do a custom preview (the thing at the bottom of the inspector window) of a Timeline Clip, but it seems to do nothing.
    I created an editor class with
    Code (CSharp):
    1. [CustomPreview(typeof(PauseAnimationSetterClip))]
    as I usually do for other classes, but it does nothing... I can't see any preview in my Inspector or any log.
    I've tried to link the preview to the behaviour, but it doesn't work either.

    Has anyone managed to do this?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    I'm not sure if there is a way to get that to work. What's selected is an internal type that wraps the clip. The inspector of the clips embeds the inspector of the playable asset it references. (Similar to components for a gameobject).

    So, the PauseAnimationSetterClip is never the object that's selected, so the preview won't show up. There may be a way around that I'm not aware of though.