Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[Editor] Making animated gizmos

Discussion in 'Immediate Mode GUI (IMGUI)' started by The-Spaniard, Feb 20, 2015.

  1. The-Spaniard


    Jan 7, 2012
    Hi everyone!

    In my work on a bezier path editor, I've been trying to create editor nodes that "pulse" or animate in some way to show that they are active/selected. It's not totally essential, but I was wondering if anyone has found a way to do it?

    What I have for now is the size parameter of the gizmo being put through Mathf.Sin(), which works great if the scene window is being moved around, but because OnGizmo only runs when the scene view is changing, the pulsing doesn't work if the user is not interacting (somewhat defeating the purpose of making the gizmos more noticable...). So ideally I need to find a way for the editor script drawing the gizmos to update at the editor's refresh rate.

    Any ideas?
  2. karl_


    Mar 4, 2010
    Just register with the `EditorApplication.update` delegate, then you get a callback every frame.