fix: sub-emitter's inherit velocity module doubles at runtime

close #349
This commit is contained in:
mob-sakai
2025-01-01 10:05:46 +09:00
parent f4b28b68b1
commit 1c33dac125
3 changed files with 34 additions and 7 deletions

View File

@@ -577,12 +577,14 @@ namespace Coffee.UIExtensions
{
var ps = particleSystems[i];
if (!ps) continue;
GetRenderer(j++).Set(this, ps, false);
var mainEmitter = ps.GetMainEmitter(particleSystems);
GetRenderer(j++).Set(this, ps, false, mainEmitter);
// If the trail is enabled, set it additionally.
if (ps.trails.enabled)
{
GetRenderer(j++).Set(this, ps, true);
GetRenderer(j++).Set(this, ps, true, mainEmitter);
}
}
}