diff --git a/CHANGELOG-PRERELEASE.md b/CHANGELOG-PRERELEASE.md index b4219bd6e..479a4221c 100644 --- a/CHANGELOG-PRERELEASE.md +++ b/CHANGELOG-PRERELEASE.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog]. ### Fixed - Null Reference Exception with newly created VRCAnimatorPlayAudio `#1199` +- Particle System that uses local scale will be broken `#1197` ### Security diff --git a/CHANGELOG.md b/CHANGELOG.md index 150cc0299..d316d47c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog]. ### Fixed - Null Reference Exception with newly created VRCAnimatorPlayAudio `#1199` +- Particle System that uses local scale will be broken `#1197` ### Security diff --git a/Editor/APIInternal/ComponentInfos.cs b/Editor/APIInternal/ComponentInfos.cs index fb4283ab8..e1da1affa 100644 --- a/Editor/APIInternal/ComponentInfos.cs +++ b/Editor/APIInternal/ComponentInfos.cs @@ -132,6 +132,12 @@ protected override void CollectDependency(ParticleSystem component, ComponentDep { collector.MarkEntrypoint(); + // Some particle system module refers local scale instead of hierarchy / global scale + // so we need to keep parent transform. + // TODO: it might be better to check if the particle system is in local space or not. + // TODO: it might be better to provide API to keep local scale. + collector.AddDependency(component.transform.parent); + if (component.main.simulationSpace == ParticleSystemSimulationSpace.Custom) // not animated collector.AddDependency(component.main.customSimulationSpace);