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

Method ApplyModifiedParameters

Source/Engine/Particles/ParticleEffect.cpp:522–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522void ParticleEffect::ApplyModifiedParameters()
523{
524 if (_parametersOverrides.IsEmpty())
525 return;
526 PROFILE_MEM(Particles);
527
528 // Parameters getter applies the parameters overrides
529 if (_parameters.IsEmpty())
530 {
531 GetParameters();
532 return;
533 }
534
535 for (auto& e : _parametersOverrides)
536 {
537 const auto param = GetParameter(e.Track, e.Id);
538 if (param)
539 {
540 param->SetValue(e.Value);
541 }
542 else
543 {
544 LOG(Warning, "Failed to apply the particle effect parameter (id={0} from track={1})", e.Id, e.Track);
545 }
546 }
547}
548
549void ParticleEffect::OnAssetChanged(Asset* asset, void* caller)
550{

Callers

nothing calls this directly

Calls 3

GetParameterFunction · 0.85
IsEmptyMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected