feat: preview the ParticleSystem playback when selecting a UIParticle in the Editor

This commit is contained in:
mob-sakai
2026-06-23 19:03:37 +09:00
parent f961b8dc89
commit 7363f7497c
6 changed files with 263 additions and 11 deletions

View File

@@ -545,7 +545,10 @@ namespace Coffee.UIExtensions
{
var ps = particles[i];
if (!ps
#if UNITY_EDITOR
|| ps.hideFlags == HideFlags.HideAndDontSave // Dummy ParticleSystems for preview.
|| ps.gameObject.CompareTag("EditorOnly") // Ignore "EditorOnly" tagged ParticleSystems.
#endif
|| ps.GetComponentInParent<UIParticle>(true) != this) // Ignore ParticleSystems that are not under this UIParticle.
{
particles.RemoveAt(i);