- Home /
Question by
Rustam-Ganeyev · Apr 04, 2013 at 09:11 AM ·
editorscene
Update scene view in editor script
I am modifying many scenes by editor script:
foreach (string scenePath in scenes) {
ModifyScene(scenePath);
}
private static void ModifyScene(string path)
{
EditorApplication.OpenScene(path);
//EditorApplication.RepaintHierarchyWindow();
//HandleUtility.Repaint();
//do changes in scene
}
And I want to see changes in my scene(because my operations take minute-two), and I'd like to see currently open scene in scene editor. So I want to find a way to update my scene view after EditorApplication.OpenScene(path). I tried to do EditorApplication.RepaintHierarchyWindow();, but no effect. HandleUtility.Repaint() throws me an error "Handles.Repaint called outside an editor OnGUI" and in my case(i'm calling via [MenuItem]) is not usable. How to solve this?
Comment