MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Sync

Method Sync

Source/Engine/Particles/ParticleEffect.cpp:378–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void ParticleEffect::Sync()
379{
380 auto system = ParticleSystem.Get();
381 if (!system || system->WaitForLoaded())
382 {
383 Instance.ClearState();
384 return;
385 }
386 PROFILE_MEM(Particles);
387
388 Instance.Sync(system);
389
390 for (int32 i = 0; i < system->Tracks.Count(); i++)
391 {
392 auto& track = system->Tracks[i];
393 if (track.Type == ParticleSystem::Track::Types::Emitter)
394 {
395 const int32 emitterIndex = track.AsEmitter.Index;
396 const auto emitter = system->Emitters[emitterIndex].Get();
397 if (emitter)
398 {
399 Instance.Emitters[emitterIndex].Sync(Instance, system, emitterIndex);
400 }
401 }
402 }
403}
404
405SceneRenderTask* ParticleEffect::GetRenderTask() const
406{

Callers 1

JobMethod · 0.45

Calls 4

WaitForLoadedMethod · 0.80
GetMethod · 0.45
ClearStateMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected