Fix particles view information in Editor when Game window is unused

This commit is contained in:
Wojtek Figat
2021-02-19 11:23:18 +01:00
parent cc980fd70d
commit ce9df56a97
8 changed files with 54 additions and 19 deletions

View File

@@ -183,10 +183,10 @@ namespace FlaxEditor.Viewport
_editor = editor;
// Prepare rendering task
Task.ActorsSource = ActorsSources.ScenesAndCustomActors;
Task.ActorsSource = ActorsSources.Scenes;
Task.ViewFlags = ViewFlags.DefaultEditor;
Task.Begin += RenderTaskOnBegin;
Task.CollectDrawCalls += RenderTaskOnCollectDrawCalls;
Task.Begin += OnBegin;
Task.CollectDrawCalls += OnCollectDrawCalls;
Task.PostRender += OnPostRender;
// Render task after the main game task so streaming and render state data will use main game task instead of editor preview
@@ -390,7 +390,7 @@ namespace FlaxEditor.Viewport
Editor.Instance.SceneEditing.Spawn(actor);
}
private void RenderTaskOnBegin(RenderTask task, GPUContext context)
private void OnBegin(RenderTask task, GPUContext context)
{
_debugDrawData.Clear();
@@ -406,7 +406,7 @@ namespace FlaxEditor.Viewport
}
}
private void RenderTaskOnCollectDrawCalls(RenderContext renderContext)
private void OnCollectDrawCalls(RenderContext renderContext)
{
if (_previewStaticModel)
{