Search Unity

Question API to recreate Animation Window Preview mode in my custom tool?

Discussion in 'Scripting' started by michalpiatek, Oct 11, 2022.

  1. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    I am making a component and I'd love to add a preview in the editor. Animation window cleverly "locks" all animated properties while in Preview Mode and marks them with a special colour. When Preview Mode is disengaged, all values go back to their previous value. On top of that, Wnity won't save new values if you ctrl+s while in preview mode.

    How that is implemented? Is there any API I can use to reproduce the Preview mode of the Animation window?
    image_2022-10-11_131831805.png
     
  2. michalpiatek

    michalpiatek

    Joined:
    Feb 26, 2021
    Posts:
    81
    Pretty please, anyone? :(
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448