moved UpdateCameraPreview call to on selection changed and on state change
This commit is contained in:
@@ -150,8 +150,22 @@ namespace FlaxEditor.Windows
|
||||
};
|
||||
Viewport.Task.ViewFlags = ViewFlags.DefaultEditor;
|
||||
|
||||
Editor.SceneEditing.SelectionChanged += OnSelectionChanged;
|
||||
|
||||
Editor.Scene.ActorRemoved += SceneOnActorRemoved;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEditorStateChanged()
|
||||
{
|
||||
base.OnEditorStateChanged();
|
||||
UpdateCameraPreview();
|
||||
}
|
||||
|
||||
private void OnSelectionChanged()
|
||||
{
|
||||
UpdateCameraPreview();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether actor pilot feature is active and in use.
|
||||
@@ -376,9 +390,6 @@ namespace FlaxEditor.Windows
|
||||
/// <inheritdoc />
|
||||
public override void Update(float deltaTime)
|
||||
{
|
||||
// TODO: call camera preview update only on selection change, or state change
|
||||
UpdateCameraPreview();
|
||||
|
||||
if (Root.GetKeyDown(KeyboardKeys.F12))
|
||||
{
|
||||
Viewport.TakeScreenshot();
|
||||
|
||||
Reference in New Issue
Block a user