Skip to content

Instantly share code, notes, and snippets.

@kyuskoj
Last active September 25, 2021 13:34
Show Gist options
  • Save kyuskoj/8dfedd02337b9ab69d21c59fe4d73314 to your computer and use it in GitHub Desktop.
Save kyuskoj/8dfedd02337b9ab69d21c59fe4d73314 to your computer and use it in GitHub Desktop.
Force the Inspector to update every 0.1 seconds. (Unity)
private IEnumerator UpdateInspector()
{
var inspectorWindowType = typeof(Editor).Assembly.GetType("UnityEditor.InspectorWindow");
var targetInspector = EditorWindow.GetWindow(inspectorWindowType, false, null, false);
while (targetInspector)
{
targetInspector.Repaint();
yield return YieldCache.WaitForSeconds(.2f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment