Refreshing custom Inspector window while playing

Hello,

I need to have an Inspector window constantly refreshed while the Editor is playing (to show some data). How can this be achieved?

I used to rely on calling Repaint within OnSceneGUI, but that works only if the Scene window is visible.

Thanks

SOLVED. A custom Inspector window will automatically refresh if one of its target’s serialized properties change.

When playing, you can set a coroutine to change a property continuously with the desired interval, thus automatically refreshing the Inspector (you’ll want to check Application.isEditor first, to avoid starting a useless coroutine while not in the Unity Editor).