This commit is contained in:
in0finite 2022-03-26 23:53:02 +01:00
parent 653bf4c7ae
commit c258137b70
2 changed files with 8 additions and 2 deletions

View file

@ -1,4 +1,5 @@
using System; using SanAndreasUnity.Utilities;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@ -158,5 +159,10 @@ namespace SanAndreasUnity.Editor
{ {
return DisplayPausableProgressBar(title, text, progress, "Are you sure ?", "Continue", "Quit"); return DisplayPausableProgressBar(title, text, progress, "Are you sure ?", "Continue", "Quit");
} }
public static void FocusSceneViewsOnPosition(Vector3 pos)
{
SceneView.sceneViews.Cast<SceneView>().ForEach(s => s.LookAt(pos));
}
} }
} }

View file

@ -65,7 +65,7 @@ namespace SanAndreasUnity.Editor
void GoTo(PathNode node) void GoTo(PathNode node)
{ {
SceneView.sceneViews.Cast<SceneView>().ForEach(s => s.LookAt(node.Position)); EditorUtils.FocusSceneViewsOnPosition(node.Position);
} }
} }
} }