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

@@ -144,7 +144,7 @@ void GPUParticles::Execute(GPUContext* context, ParticleEmitter* emitter, Partic
}
// Skip if can
SceneRenderTask* viewTask = PARTICLE_EMITTER_GET_VIEW_TASK(effect);
SceneRenderTask* viewTask = effect->GetRenderTask();
const int32 threads = data.Buffer->GPU.ParticlesCountMax + data.GPU.SpawnCount;
if (data.GPU.DeltaTime <= 0.0f || threads == 0 || !_mainCS)
return;